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
Storage Emulator does not support createReadStream() #3469
Comments
I suspect we don't implement the endpoint for |
#3486 seems to be another report of this same issue. |
@sceee I found the same issue, and finally i tried to add optional param Example
it seems to work for me on emulator. but on production i remove that. I thought of doing that for a while before it was officially fixed. |
@adzharamrullah thanks. This could be a temporary workaround for |
I had the exact same problem, and this code: const sendPicture = async (
res: functions.Response,
uid: string,
id: string
) => {
const file = pictures.getFile(uid, id) // This is getting my file by generating correct path and connecting to bucket.
const [metadata] = await file.getMetadata()
res.set('Cache-Control', 'public, max-age=3600, s-maxage=3600')
res.type(metadata.contentType)
const validation = process.env.NODE_ENV === 'development' ? false : 'crc32c'
file.createReadStream({ validation }).pipe(res)
} Is working both in production and development when manually setting |
Note that this is a recent regression (not sure how recent). It worked well in 9.1.2 (at least the |
Having same problems on firebase-tools |
[REQUIRED] Environment info
firebase-tools:
v9.12.1
Platform:
Windows 10
[REQUIRED] Test case
Have a Cloud Function with the following code (this just accesses and downloads a file):
...
The same occurs with the following code:
[REQUIRED] Steps to reproduce
[REQUIRED] Expected behavior
Downloading files in Storage works with Storage emulator as it works with production Firebase service.
[REQUIRED] Actual behavior
The following error is logged
I can say that the same code works in production with the real Storage service without this error.
The text was updated successfully, but these errors were encountered: