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: parse rawBody buffer when isBuffer #369

Closed
wants to merge 1 commit into from

Conversation

dvanmali
Copy link

Flip order of operation.

Fixes issue:

[request error] [unhandled] [500] The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received an instance of Promise

Flip order of operation.

Fixes issue:
```
[request error] [unhandled] [500] The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received an instance of Promise
```
@dvanmali dvanmali changed the title Parse rawBody buffer when isBuffer fix: parse rawBody buffer when isBuffer Mar 31, 2023
@dvanmali
Copy link
Author

dvanmali commented Apr 5, 2023

@pi0 Ready for merge

@chrisspiegl
Copy link

chrisspiegl commented Apr 6, 2023

I just ran into this error message while deploying deploying Nuxt 3 on Firebase and trying to get VueFire auth sessions working. I hope the fix will be merged soon and working 👍.

I've tried to get this up and deployed but since it's not released on NPM I have not figured out how to get it onto Firebase to try out.

I hope this get's tested / verified / merged sometime soon as it appears to be a serious holdup for our project right now.

@dvanmali
Copy link
Author

dvanmali commented Apr 6, 2023

Link issue #371

@sawa-ko
Copy link

sawa-ko commented Apr 7, 2023

Any progress?
I need this fix please 🙏.

@chrisspiegl
Copy link

@sawa-ko You can use the workaround I mentioned in the issue #371 (comment)

Basically downgrading to version v1.6.2 will do the trick for now.

@pi0
Copy link
Member

pi0 commented Apr 28, 2023

Hi and sorry for the late review. I think the logic is correct. rawBody util is supposed to return a buffer or convert it to buffer.

Is this issue only reproducable with nitro and firebase preset?

@maou-shonen
Copy link
Contributor

maou-shonen commented Apr 28, 2023

Hi and sorry for the late review. I think the logic is correct. rawBody util is supposed to return a buffer or convert it to buffer.

Is this issue only reproducable with nitro and firebase preset?

This problem also happens on nuxt3 nodejs preset,
The solution proposed above also worked for me,

@pi0 pi0 closed this in 2e472e8 May 5, 2023
@pi0
Copy link
Member

pi0 commented May 5, 2023

Sorry again for delay on this issue. I could just locally reproduce it.

The problem was type checking on unresolved promises fixed by 2e472e8

Please remove any resolutions or version fields and update lockfile to the latest to receive the fix.


Side note: Please consider opening an issue with reproduction in such cases. It could help to resolve much earlier 🙏🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants