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

image cannot read property startswith of undefined #175

Closed
codersmoon opened this issue Jan 24, 2020 · 6 comments · Fixed by #183
Closed

image cannot read property startswith of undefined #175

codersmoon opened this issue Jan 24, 2020 · 6 comments · Fixed by #183
Assignees
Labels
blocked Blocked by an outstanding issue or PR type: bug Something isn't working

Comments

@codersmoon
Copy link

Hİ.I use google cloud firebase image extantion for image resizing ( for google cloud storage images ) ; but i get this error :

TypeError: Cannot read property 'startsWith' of undefined at Object.exports.isImage (/srv/functions/lib/validators.js:18:48) at Object.<anonymous> (/srv/functions/lib/index.js:47:32) at Generator.next (<anonymous>) at /srv/functions/lib/index.js:22:71 at new Promise (<anonymous>) at __awaiter (/srv/functions/lib/index.js:18:12) at exports.generateResizedImage.functions.storage.object.onFinalize (/srv/functions/lib/index.js:44:82) at cloudFunction (/srv/node_modules/firebase-functions/lib/cloud-functions.js:131:23) at /worker/worker.js:825:24 at <anonymous>

@Ehesp Ehesp added the type: bug Something isn't working label Jan 25, 2020
@Ehesp
Copy link
Member

Ehesp commented Jan 25, 2020

Hi @codersmoon please could you provide more details about your setup:

  • Version of extension
  • Arguments which you set it up with
  • Replication flow

Thanks

@Ehesp
Copy link
Member

Ehesp commented Jan 26, 2020

So this error would be thrown when no contentType exists. How are you uploading this image? What is being uploaded?

@codersmoon
Copy link
Author

i use node.js app on google cloud run for image upload to google cloud storage.if i upload with firebase console works perfectly; but i use my app , images do not contain content type.İt doesn't work when changing the content type after uploading.like this :
gsutil -h "Content-Type:image/jpg" \
i ı do this , images get content type;but again not work .ty.

@Ehesp Ehesp self-assigned this Jan 27, 2020
@Ehesp
Copy link
Member

Ehesp commented Jan 27, 2020

Thanks, I'll take a look into both situations.

@codersmoon
Copy link
Author

codersmoon commented Jan 27, 2020

my cloud run node js version is different from firebase image ext.cloud run node version 10.14.2 but firebase 8.

@Ehesp
Copy link
Member

Ehesp commented Jan 31, 2020

#183

@Ehesp Ehesp added the blocked Blocked by an outstanding issue or PR label Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Blocked by an outstanding issue or PR type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants