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

Error: Cannot create URL for blob #223

Closed
acostalima opened this issue Oct 22, 2020 · 8 comments · Fixed by #267
Closed

Error: Cannot create URL for blob #223

acostalima opened this issue Oct 22, 2020 · 8 comments · Fixed by #267

Comments

@acostalima
Copy link
Contributor

acostalima commented Oct 22, 2020

The issue apparently lies in NativeModules. The import is undefined and, thus, BLOB_URL_PREFIX remains null. This patch fixes the problem.

Has anyone else experienced this as well? It's happening on RN v0.63.2 on my end.
@charpeni, let know if you want me to open a PR to address this.

Related: ipfs/js-ipfs#2813

@charpeni
Copy link
Owner

Thanks for sending this!

Hmm, do you have a repro case? 🤔

We should make sure to cover this with tests.

@acostalima
Copy link
Contributor Author

acostalima commented Oct 22, 2020

Hmm, do you have a repro case?

More or less. 😅
I'll prepare one and share with you shortly.

@acostalima
Copy link
Contributor Author

@charpeni you can find a repro at https://github.com/ipfs-shipyard/react-native-ipfs-demo. Check out branch repro/react-native-url-polyfill-#223.
Once the app starts up, press on the "ipfs.add()" button and then on the "add string" button. The error will be thrown at that point. You can trace the root cause to node_modules/react-native/Libraries/Network/FormData.js, line 109.

@acostalima
Copy link
Contributor Author

Ping @charpeni. Did you have a look at this in the meantime?

@charpeni
Copy link
Owner

@acostalima Sorry for the delay here! I'm struggling to find the time to work on this, but I'm definitely planning on looking at this as well as updating the whole package. To be honest, I think your patch seems like a good candidate, I just need to find the time to work on this.

@acostalima
Copy link
Contributor Author

@charpeni no worries! Please take your time.

@kennym
Copy link
Contributor

kennym commented Feb 17, 2021

I can reproduce this exact same issue on RN 0.63.3.

@kennym
Copy link
Contributor

kennym commented Feb 18, 2021

@charpeni I've submitted a possible fix

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