Skip to content
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

Fix a name of an internal _onRequestWithOptions property #1482

Merged
merged 8 commits into from Jul 9, 2019

Conversation

merlinnot
Copy link
Contributor

Description

Resolves #1480

Apparently this repository relies on a private method defined in firebase-functions, which was renamed as part of firebase/firebase-functions#495. This PR updates the name of the method.

Scenarios Tested

Unfortunately I was not able to run tests locally by simply doing npm install && npm run test, even on the master branch. I'll keep trying, but I thought that this PR might be simple enough to create it already, without

Sample Commands

Not relevant.

@googlebot googlebot added the cla: yes Manual indication that this has passed CLA. label Jul 9, 2019
@coveralls
Copy link

coveralls commented Jul 9, 2019

Coverage Status

Coverage increased (+0.1%) to 61.697% when pulling 900f728 on merlinnot:fix-issue-1480 into a1c76a0 on firebase:master.

@merlinnot
Copy link
Contributor Author

CI is green, so I guess issues with tests are just on my local machine.

@merlinnot
Copy link
Contributor Author

@thechenky for a review

@samtstern
Copy link
Contributor

@merlinnot I was able to reproduce the bug on master and then make it go away by applying this PR.

@samtstern
Copy link
Contributor

@merlinnot the problem with this is now the opposite. If you're using firebase-functions@3.0.x then emulation will fail because this code now relies on internal APIs of 3.1.0.

So we either need to:
a) Increase the minimum version of the functions SDK for emulation to 3.1.0 (which will require changing some logic as we only check majors right now).
b) Introduce logic to branch on the version and choose the right internal method name.

And in the long term we need to stop relying on internal APIs at all, but let's get a quick fix in first.

I will send you a PR that does option b

@samtstern
Copy link
Contributor

@merlinnot see merlinnot#1

samtstern and others added 2 commits July 9, 2019 08:50
@samtstern samtstern self-requested a review July 9, 2019 16:03
@merlinnot
Copy link
Contributor Author

Sure, let's do that.

@samtstern samtstern requested a review from bkendall July 9, 2019 16:19
changelog.txt Outdated Show resolved Hide resolved
@samtstern samtstern merged commit f6169ff into firebase:master Jul 9, 2019
@samtstern
Copy link
Contributor

Thank you @merlinnot!

@merlinnot merlinnot deleted the fix-issue-1480 branch July 9, 2019 16:56
@istevkovski
Copy link

I was able to fix the issue by downgrading to firebase-functions@3.0.2 , otherwise while using firebase-functions@3.1.0 I still have the following issue -> TypeError: _onRequestWithOpts is not a function

@isabelleyzhou
Copy link

if I have the same issue, is downgrading to 3.0.2 the only thing I need to do to receive these changes? because i'm still getting the same error despite the downgrade.

@tcha-tcho
Copy link

@isabelleyzhou I think I found our problem. The version of firebase-tools installed by Google is outdated on global envy. Try to run sudo npm i -g firebase-tools (you will need the version 7.2.4). After that don't use firebase serve --only functions it won't work, you will need to use: firebase emulators:start --only functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Manual indication that this has passed CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeError: _onRequestWithOpts is not a function
8 participants