-
Notifications
You must be signed in to change notification settings - Fork 932
Encoding is not UTF-8 error #414
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
Comments
Only avalible solution what I find it is using backgrounf.html, wich load firebase.js (<script> tag) and with messaging betwin background and conten scripts. But if u know how download firebase.js or how transform firebase.js in order to use the js file in chrome extension - please tell me |
Same problem... |
Seeing the same thing... |
same problem |
I found a work-around. It doesn't look pretty, but by recompiling the second library that is included in firebase.js with Google closure compiler I was able to make it work: https://pastebin.com/QPDqVimD |
Another workaround by avoiding to import |
@davemart-in your solution's awesome ! it solves it perfectly! Thanks! |
Awesome! Glad to hear!
…On Thu, Apr 12, 2018 at 5:50 AM protonhs ***@***.***> wrote:
@davemart-in <https://github.com/davemart-in> your solution's awesome !
it solves it perfectly! Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#414 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFX61iR2476JtsGJj3zEQuN9-hfFFaxzks5tnyNVgaJpZM4RVfEH>
.
|
I think leaving firebase-auth.js out is the best solution. You can auth in the chrome background or in the frame that pops up when you click on the icon. You can use send message to pass the auth token somehow. |
@davemart-in Brilliant! it solves it perfectly! Thank You! |
So I don't know what this approach might break.. but I wasn't happy with recompiling or using background.html and sending messages. So I searched the source for |
FWIW, my guess is that line is coming from auth's use of closure's json library... https://github.com/google/closure-library/blob/db35cf1524b36a50d021fb6cf47271687cc2ea33/closure/goog/json/json.js#L305 Not 100% sure why it triggers the UTF-8 error or if there's a workaround though. |
Yes, I believe this is the check (unminified) that I referenced in the comment above. Reassuring to see that it probably won't have any adverse effects on other browsers. Although my removal of the Also, for the record, I never actually managed to auth from the content script in the end, there is no was to access |
I have the same problem with PHP when I extract text from HTML string by substr function. The solution for who has the same problem like me: |
Is recompiling still the best solution for this? I attempted to recompile firebase.js and the complier threw an error. I was able to recompile individual libs i.e auth, app, firestone. however I get the same error after replacing my node_modules code with the recompiled code |
[REQUIRED] Describe your environment
[REQUIRED] Describe the problem
browser show error When I try add firebase.js to chrome extension:
Can't load file /../firebase.js ... . Encoding is not UTF-8.
I try convert it to utf-8 but browser show error anyway
Steps to reproduce:
The text was updated successfully, but these errors were encountered: