-
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
Python Functions Emulator raises an error when path has spaces #5830
Comments
taeold
pushed a commit
that referenced
this issue
May 12, 2023
Proposed fix for #5830 Issue seems to be caused by [spawn](https://github.com/firebase/firebase-tools/blob/f8f19dc060e6daf060b87d38fd2a38d24bab8210/src/functions/python.ts#L38) raising an error when path provided has spaces. Might be related to nodejs/node#38490. ### Scenarios Tested Similar to steps provided in #5830 1. Run `mkdir 'i like spaces'` 2. Run `cd i\ like\ spaces` or `cd 'i like spaces'` 3. Run `firebase init functions --project <project_id>` 1. Select `Python` 2. Do you want to install dependencies now? Yes 4. Run `cd functions` 5. Run `firebase emulators:start` 1. Emulators start with no issues 7. Uncomment code in `main.py` to deploy 8. Run `firebase deploy --only functions` 1. Functions deployed with no issues ### Sample Commands `firebase emulators:start` && `firebase deploy --only functions`
taeold
pushed a commit
that referenced
this issue
May 17, 2023
<!-- Thank you for contributing to the Firebase community! Please fill out the form below. Run the linter and test suite ============================== Run `npm test` to make sure your changes compile properly and the tests all pass on your local machine. We've hooked up this repo with continuous integration to double check those things for you. --> ### Description <!-- Are you fixing a bug? Implementing a new feature? Make sure we have the context around your change. Link to other relevant issues or pull requests. --> Proposed fix for #5854. Related to #5830. Issue seems to be similar as the error message shows the incomplete path when path has spaces. e.g. if path is `/Users/<user>/Desktop/project directory/function`, error message will shows path `/Users/<user>/Desktop/project`. ### Scenarios Tested <!-- Write a list of all the user journeys and edge cases you've tested. Instructions for manual testing can be found at https://github.com/firebase/firebase-tools/blob/master/.github/CONTRIBUTING.md#development-setup --> 1. Create a directory with a space 2. Run `firebase init functions` and run through the setup for Python functions. 3. Run `firebase init emulators` and setup the functions emulator 4. Run `firebase emulators:start` ### Sample Commands <!-- Proposing a change to commands or flags? Provide examples of how they will be used. --> `firebase emulators:start`
tonyjhuang
pushed a commit
that referenced
this issue
May 22, 2023
Proposed fix for #5830 Issue seems to be caused by [spawn](https://github.com/firebase/firebase-tools/blob/f8f19dc060e6daf060b87d38fd2a38d24bab8210/src/functions/python.ts#L38) raising an error when path provided has spaces. Might be related to nodejs/node#38490. ### Scenarios Tested Similar to steps provided in #5830 1. Run `mkdir 'i like spaces'` 2. Run `cd i\ like\ spaces` or `cd 'i like spaces'` 3. Run `firebase init functions --project <project_id>` 1. Select `Python` 2. Do you want to install dependencies now? Yes 4. Run `cd functions` 5. Run `firebase emulators:start` 1. Emulators start with no issues 7. Uncomment code in `main.py` to deploy 8. Run `firebase deploy --only functions` 1. Functions deployed with no issues ### Sample Commands `firebase emulators:start` && `firebase deploy --only functions`
tonyjhuang
pushed a commit
that referenced
this issue
May 22, 2023
<!-- Thank you for contributing to the Firebase community! Please fill out the form below. Run the linter and test suite ============================== Run `npm test` to make sure your changes compile properly and the tests all pass on your local machine. We've hooked up this repo with continuous integration to double check those things for you. --> ### Description <!-- Are you fixing a bug? Implementing a new feature? Make sure we have the context around your change. Link to other relevant issues or pull requests. --> Proposed fix for #5854. Related to #5830. Issue seems to be similar as the error message shows the incomplete path when path has spaces. e.g. if path is `/Users/<user>/Desktop/project directory/function`, error message will shows path `/Users/<user>/Desktop/project`. ### Scenarios Tested <!-- Write a list of all the user journeys and edge cases you've tested. Instructions for manual testing can be found at https://github.com/firebase/firebase-tools/blob/master/.github/CONTRIBUTING.md#development-setup --> 1. Create a directory with a space 2. Run `firebase init functions` and run through the setup for Python functions. 3. Run `firebase init emulators` and setup the functions emulator 4. Run `firebase emulators:start` ### Sample Commands <!-- Proposing a change to commands or flags? Provide examples of how they will be used. --> `firebase emulators:start`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When trying to start the Cloud Functions emulator that uses Python, an error is being raised when the path has spaces. An error is also raised when trying to deploy.
[REQUIRED] Environment info
firebase-tools: 12.0.0
Platform: macOS
Node: v18.15.0
Python: v3.11.3
[REQUIRED] Steps to reproduce
mkdir 'i like spaces'
cd i\ like\ spaces
orcd 'i like spaces'
firebase init functions --project <project_id>
Python
cd functions
firebase emulators:start
main.py
to deployfirebase deploy --only functions
Notes:
No issues are raised running either
firebase emulators:start
orfirebase deploy
commands when using a path that has no spaces. Replace steps 1 & 2 from above with:mkdir 'no-spaces'
cd no-spaces
[REQUIRED] Expected behavior
Functions emulator to start without any issues and functions to deploy without any issues.
[REQUIRED] Actual behavior
Error is raised after running
firebase emulators:start
. Relevant logs:Error is raised after running
firebase deploy --only functions
. Relevant logs:The text was updated successfully, but these errors were encountered: