-
Notifications
You must be signed in to change notification settings - Fork 902
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pub/Sub Emulator has exited with code: 1 #5614
Comments
This issue does not seem to follow the issue template. Make sure you provide all the required information. |
Thanks for the report. We're not able to reproduce this bug on our end just yet. Question: I see you're running JDK11 - if you upgrade to the latest version JDK 19 or 20, does that resolve the issue? https://openjdk.org/projects/jdk/ Other ideas to help us identify the issue: |
I was using Node19.8.1 and openjdk19.0.2 at the time of the problem, after I clean and reinstalled Node16 and jdk11 the problem still exists. I can run pubsub emulator using gcloud CLI by
|
Thanks Ruisi-Lu, If you run |
Thanks for your help. |
Possible related issue: firebase/firebase-tools-ui#933 As soon as I downgraded to Node 16, it started working again |
I had this issue until I downgraded Node from latest (19.x.x) to LTS (18.15.0). |
Thanks for the input everyone, we've been seeing a few Node 19 errors so downgrading to 18 should be a first step. If that doesn't resolve the issue please file an issue or post in this thread. |
Had the same issue today. The following instructions worked for me on macOS:
|
😫 I've found the real issue. To be clear, I'm talking about this error:
What happens? @christhompsongoogle & firebase team, please take a look at the changelogs for the node versions mentioned above to nail down the exact issue: For those who is out of luck today and have their docker containers rebuilt and perhaps uses ubuntu as a base image to replicate cloud functions environment, me sharing my dockerfile config to use with a specific node version: # Trying to replicate the exact cloud functions execution environment
# See https://cloud.google.com/functions/docs/concepts/execution-environment
ARG UBUNTU_VERSION=22.04
ARG NODE_VERSION=18.15.0
ARG JAVA_VERSION=18
FROM ubuntu:$UBUNTU_VERSION as emulators
ARG NODE_VERSION
ARG JAVA_VERSION
RUN apt-get update
ENV HOME=/home/node
ENV NVM_DIR=/usr/local/nvm
ENV NODE_PATH=$NVM_DIR/versions/node/v$NODE_VERSION/bin
ENV PATH=$NODE_PATH:$PATH
# We can install system packages that are available on cloud functions VMs
# Full list of pre-installed packages: https://cloud.google.com/functions/docs/reference/system-packages
RUN apt-get install -y \
curl \
openjdk-${JAVA_VERSION}-jre-headless # java is not preinstalled on cloud functions, but is needed to run emulators
# Install nvm, Node
RUN mkdir $NVM_DIR && \
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash && \
bash $NVM_DIR/nvm.sh ${NODE_VERSION}
# Install firebase-tools and emulators \
RUN npm i -g firebase-tools && \
firebase setup:emulators:database && \
firebase setup:emulators:firestore && \
firebase setup:emulators:pubsub && \
firebase setup:emulators:storage && \
firebase setup:emulators:ui
# Preserve firebase emulators cache
VOLUME $HOME/.cache
# Create a user 'node' make him an owner of $HOME
RUN groupadd --gid 1000 node && \
useradd --uid 1000 --gid node --shell /bin/bash --create-home node && \
chown -R node:node $HOME
WORKDIR $HOME
USER node
EXPOSE 4000
EXPOSE 5002
EXPOSE 5001
EXPOSE 8080
EXPOSE 8085
EXPOSE 9000
EXPOSE 9005
EXPOSE 9099
EXPOSE 9199
EXPOSE 9299
CMD ["sh"] |
This started happening to me today (only on Bitrise CI tho). I removed pubsub from firebase.json (since I didn't need it in my project anyway) and that "fixed" it. Looks like @iSuslov might be right about something wrong with the unzipper
|
On my experience this issue was caused because of trying to run the Pub/Sub emulator with a non LTS version of Node. Once you downgrade Node, you also need to remove the entire |
This reproduces the issue for us
switching the node install from |
I have this error with :
|
maybe it's not that obvious, but as mentioned in #5614 (comment) you can just downgrade to node 18.15. so if you use a |
…#5714) * Replace dependency on broken node-unzipper with native zlib Fixes: firebase#5614 firebase#5677 firebase/firebase-tools-ui#939 firebase/firebase-tools-ui#940 * remove unused broken.zip fixture * add changelog record * fix timing out test * fix use operating system file delimiter * addressing code review comments from @joehan * better support for Windows path separators TODO: remove console logs after @christhompsongoogle tries it out. * addressing code review comments from @joehan * Add support for zip files that use signed data descriptors instead of a full entry header * Formats, fixes uneeded async/await * Remove unnecessary handling for empty files * Remove console.log --------- Co-authored-by: joehan <joehanley@google.com>
* Replace dependency on broken node-unzipper with native zlib Fixes: #5614 #5677 firebase/firebase-tools-ui#939 firebase/firebase-tools-ui#940 * remove unused broken.zip fixture * add changelog record * fix timing out test * fix use operating system file delimiter * addressing code review comments from @joehan * better support for Windows path separators TODO: remove console logs after @christhompsongoogle tries it out. * addressing code review comments from @joehan * Add support for zip files that use signed data descriptors instead of a full entry header * Formats, fixes uneeded async/await * Remove unnecessary handling for empty files * Remove console.log --------- Co-authored-by: joehan <joehanley@google.com>
[REQUIRED] Environment info
firebase-tools: 11.24.1
Node.js: v16.19.1
Java: OpenJDK 11.0.18
Platform: macOS13.2.1 M1
[REQUIRED] Test case
Run
firebase emulators:start --only pubsub
[REQUIRED] Actual behavior
I have tried to manually delete
cloud-pubsub-emulator-0.7.1.jar
, and usefirebase setup:emulators:pubsub
to reinstall.The text was updated successfully, but these errors were encountered: