Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 11 months ago.
Improve this question
I am using firebase and uploading files successfully to storage in an actual firebase project but when I try and use the storage emulator I can see the upload requests fail with CORS errors.
I am using the web v9 sdk and doing something pretty simple using uploadBytes as described in the docs
In order to get it working without the emulator I had to configure CORS for my buckets and that seems to be fine. For now they are both configured like
[{"maxAgeSeconds": 3600, "method": ["GET", "POST"], "origin": ["http://localhost:3000"]}]. I guess I need to do something similar when using the emulator but I am unclear exactly what or how..
The firebase docs say
The Cloud Storage emulator does not support any bucket-level configuration including storage class, bucket-level CORS configuration, labels, or retention policies. Firebase intends to improve this support over time.
But surely that doesn't mean it is not possible to upload files to the emulator using the web sdk at all? What am I doing wrong?
I had the emulator port misconfigured and was thrown by the error talking about CORS, it works fine now
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 months ago.
Improve this question
I have the onUpdate firebase trigger. I migrated all firebase functions to the simple nodejs express server. But I am not sure if it is possible with triggers. This stackoverflow question has similar issue but it is related to firestore.
If there is no way to migrate triggers, would you propose ways to replace this logic?
Thanks in advance!
There is no drop-in replacement for the Cloud Functions trigger syntax in an Express app, but you can build the equivalent functionality.
To listen to updates from Firebase Realtime Database in an Express app, you'd use the Firebase Admin SDK that Node.js and then implement an on('value' listener, as shown in the documentation on listening for value events in Java and Node.js.
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 3 years ago.
Improve this question
I have a react application which I want to host using firebase. I managed to deploy the front end no problem. I then went to add firebase functions to the project. However when I run firebase serve, it serves an old version of the project to localhost:5000.
I've tried uninstalling and removing all firebase files from the project. Deleting the project from firebase. Rebuilding the application with npm run build and redeploying the project.
Also it deploys the most recent version correctly when I use firebase deploy but still serves the outdated version in the localhost (including files which are completely deleted from the project)
If anyone has any ideas it would be greatly appreciated as i'm completely stumped.
Thanks
The issue was cache. Clearing cache or using a different browser seems to solve the problem.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I am setting up a project in Firebase.
It will use:
Authentication, to authenticate users
Hosting for main html/js functions
Storage for app data files
Database for a small db
What I am currently missing is the availablity of a backoffice space into which I need to run python scripts that will gather files to save into Storage area with a cronjob.
Is this currently possible in Firebase, or am I missing something?
Firebase doesn't have a generalized backend solution for running arbitrary code. You can bring whatever backend you want that meets your needs.
If you want to stay in the Google ecosystem, look into using Cloud Functions to run python code that's triggered by events in your system. You can configure Cloud Scheduler to trigger a function periodically.
The Firebase tools built around Cloud Functions don't support python, only nodejs.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
How do I do my business logic on server-side on firebase?
Will the web app still have the benefits of progressive web app if I do this?
Reason to do this: Anybody can run Javascript code on your website if the person knows how to use the developer tools available in modern browsers.
Is firebase Queue (NodeJS on AWS) the way? I am a noob to all this.
You need to write more of your business logic on font-side than traditional way. To make it safe, you need to write access rules carefully on firebase console.
And it's not enough, you also need a server-side, nodejs is a good choice, there are many useful library, such as firebase, firebase-queue, firebase-admin. You can deploy these servers on the google cloud with docker.
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 4 years ago.
Improve this question
I am developing an cordova app which consumes google js api for mapping currently. Now my client wants to use offline maps using Here Maps. Is it possible to use combined version of js api for mapping, routing etc and offline support from SDK?
Technically it is possible to build a cordova plugin to bridge between the Cordova JS interface and the iOS ObjectiveC world. Please see the cordova plugin documentation here.
The interesting part is how to add the NMAMapView into the Cordova webview. you will need to write a binding plugin similar to this.
No, that is not possible. The JS API is online only...
Issue solved. I was missing NMABundle.bundle file in my project. Just added and everything started working. :) Thanks #david-leong