4

I am using firebase v10.1.0 on Win 11

I start the emulator with this command
firebase emulators:start --import=fssave --export-on-exit

i emulators: Starting emulators: auth, firestore, storage
! emulators: It seems that you are running multiple instances of the emulator suite for project winetrak-fs-81ade. This may result in unexpected behavior.

The emulator functions normally

and when I shutdown with Ctrl/C I usually get

i emulators: Received SIGINT (Ctrl-C) for the first time. Starting a clean shutdown. i emulators: Please wait for a clean shutdown or send the SIGINT (Ctrl-C) signal again to stop right now.
i Automatically exporting data using --export-on-exit "fssave" please wait for the export to finish...
Terminate batch job (Y/N)?
Error: Storage Emulator Rules runtime exited unexpectedly.
i Found running emulator hub for project winetrak-fs-81ade at http://localhost:4400
i Exporting data to: C:\Dev\React\winetrak-fs-3\fssave
i emulators: Received export request. Exporting data to C:\Dev\React\winetrak-fs-3\fssave.

When it fails a new directory is created in my project root firebase-export-1642926986972SzSRxD

WARNING: An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.

java.io.IOException: An existing connection was forcibly closed by the remote host
        at java.base/sun.nio.ch.SocketDispatcher.read0(Native Method)
        at java.base/sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43)
        at java.base/sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:276)
        at java.base/sun.nio.ch.IOUtil.read(IOUtil.java:233)
        at java.base/sun.nio.ch.IOUtil.read(IOUtil.java:223)
        at java.base/sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:358)
        at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:253)
        at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1133)
        at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:350)
        at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:151)
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:834)

Occasionally this works fine

Con A
  • 51
  • 4

1 Answers1

0

I had the same issue. Fixed it by switching to Java JDK 18. Found the solution in an open issue comment https://github.com/firebase/firebase-tools/issues/3799#issuecomment-1219730810

I'm on the firebase-tools version 11.16.1.

Hussain
  • 174
  • 1
  • 9