Trying to deploy friendly-pix Firebase web sample and encountering errors - javascript

I am trying to deploy the friendly-pix firebase sample which can be found at https://github.com/firebase/friendlypix/tree/master/web and am running into errors after deploying it. Below is a screenshot showing what the console debugger is
telling me.
I'm really at a loss for what to do as the error appears to be in the firebase script. I also checked the network tab and nothing is giving a 404 error so all scripts appear to be deployed correctly.

Related

typeEror - o.map is not a function shows in react from hosted

I am making a MERN e-commerce project with redux.
I have hosted my backend in Heroku and my frontend is hosted in vercel .
everything running fine from localhost but when I open hosted site
then it shows "o.map is not a function" on console
Here is my project github link-
Frontend- https://github.com/arijitdas13105/Ashop-frontend-new
Backend- https://github.com/arijitdas13105/ashop-backend
My hosted website link - https://ashop-frontend-99x2ayoh7-arijitdas13105.vercel.app/products
My backend Product API - https://ashop-server.herokuapp.com/api/products
let me know anything else need.
When you host in vercel, your JS code is minified with react-scripts build (You can see it in your package.json). This o.map is other variable in your code, probably the products.map. You can solve this issue using products?.map instead, so it will try to render the elements only when it has content.
If the data is not load and you don't know why, I recommend you to run it with npm run dev and figure out the reason (you can use debugger or console.log).
You can see the Network Tab in your devtools to see what the backend is returning as well.

Failed to Load Resource In Production but Not Locally

I am working on a Django project and I have it deployed on pythonanywhere.com. In my project, I am using Django Jsignature which works fine on my local machine. In production, however, when I load the particular template, I get this error in my console - 'myurl' portion is not the real url.
https://myurl.com/static/js/jSignature.min.js net::ERR_ABORTED 404 (Not Found)```
So I don't get this locally, but do in Production. Can anyone suggest for me where to start on this? I'm not even really sure where to begin, it's my first time deploying anything.
EDIT
you can see the details of django jsignature here: https://pypi.org/project/django-jsignature/
the {{form.media}} should load this script.
UPDATE 2
This is no longer working locally either. Here are the error in my console.
Uncaught SyntaxError: Invalid or unexpected token jSignature.min.js:70
Uncaught TypeError:
$(...).jSignature is not a function

Flutter Web App Blank after Firebase Deploy

My Web app works fine when I run it in debug mode using vs-code and chrome, but when I use flutter build web followed by Firebase deploy and open the app using the hosting link, my app is blank.
When I inspect it
Uncaught ReferenceError: firebase is not defined
at Object.a0s (animation_controller.dart:248)
at Object.a56 (cloud_firestore_platform_interface.dart:47)
at cloud_firestore_web.dart:26
at a0o.a (async_patch.dart:308)
at a0o.$2 (main.dart.js:22669)
at Object.a4 (async_patch.dart:238)
at Object.IT (main.dart.js:7072)
at js_helper.dart:3221
at js_helper.dart:3221
at dartProgram (js_helper.dart:3221)
This is the error I see in the console.
I have tried most of the solutions on the web, any and all help will be highly appreciated.

Chrome Developer tools throwing an error whenever some javascript error is logged on it from Electron

I have wrapped my create-react-app application in an electron instance. Now whenever I start the electron instance using electron ., the web app fires up and works properly but when I open up the dev tools in that window, I cannot see any error logs logged by the javascript in that webapp in the console of dev-tools. The strange thing here is that whenever something is supposed to be logged in the chrome devtools, I see another strange error showing up in the electron logs on the terminal in which I have started this electron instance which is as follows:
[77673:1004/120603.745812:ERROR:CONSOLE(5509)] "SyntaxError: Unexpected token x in JSON at position 7176533", source: chrome-devtools://devtools/bundled/shell.js (5509)
This terminal log shows up every time when javascript in the webapp is supposed to log something on chrome devtools. So something is definitely wrong in dev tools due to which the actual error from javascript is not getting logged in the chrome devtools and devtools is throwing the above error on electron terminal.
The create-react-app web app works perfectly fine if hosted normally on a webserver and the devtools log everything properly in that case.
This issue is specifically related to electron + devtools integration.

Configuring Sentry with React JS

I am trying to integrate Sentry error reporting with my react app. I have it working with my backend fine, but I am now having issues with the frontend.
What I have found is that if I run the Raven.configure("sdn").install() from my webrowser console, the error logging will work.
I have added the the script & configure to my index.html, but it will not log errors without my manually configuring in the browser console.
Thanks

Categories