firebase-hosting

Unity's WebGL not working with Firebase Hosting

有些话、适合烂在心里 提交于 2020-01-14 10:35:29
问题 I'm trying to deploy a WebGL built with Unity to Firebase Hosting, but I'm getting an error: Invoking error handler due to Uncaught SyntaxError: Unexpected token < . I can run it fine on localhost, though. I'm using the production build, not the development one, so I have the following file structure: index.html Release UnityLoader.js webgl.datagz webgl.jsgz webgl.memgz TemplateData (image, css and js files) Any ideas? Anyone faced this issue before? 来源: https://stackoverflow.com/questions

example for caching cloud function for firebase requests and only re cache after a successful edit to the profile

本秂侑毒 提交于 2020-01-13 19:24:10
问题 In my app, Users profiles are open to the public and only updated by the profile owner. The profile URL is example.com/profile?user=@user.me And based on the docs https://firebase.google.com/docs/hosting/functions. I can cache the response JSON of the function, in this case, the public profile. Which will save me a lot of at cloud functions executions and Firebase database bandwidth And when the user updates his profile, I want to re cache the profile in the CDN. I think that can be done by

Can sites on Firebase hosting include non-https resources?

大城市里の小女人 提交于 2020-01-13 08:04:22
问题 I have been trying to migrate my site from divshot to firebase, since firebase has taken over divshot and shut it down. Mine is a simple read only site that does not need https. It also contains links to external sites which do not support https. The site worked perfectly on divshot but it looks like firebase forces all sites to use https. Unfortunately, this causes the external sites that my site references to fail loading. The error being: Mixed Content: The page at 'https://mysite

firebase-tools error: EACCES: permission denied

佐手、 提交于 2020-01-11 07:13:12
问题 I am trying to deploy Firebase hosting of my web app. At the command line, when I type firebase deploy , I get the following error. Note: firebase deploy is just one example. The same error occurs for all firebase commands. (e.g., firebase --help , firebase -v , firebase login , firebase logout , etc.) Error /usr/local/lib/node_modules/firebase-tools/node_modules/configstore/index.js:53 throw err; ^ Error: EACCES: permission denied, open '/Users/mowzer/.config/configstore/update-notifier

How can I keep Google Cloud Functions warm?

隐身守侯 提交于 2020-01-09 10:06:35
问题 I know this misses the point of using Cloud Functions in the first place, but in my specific case, I'm using Cloud Functions because it's the only way I can bridge Next.js with Firebase Hosting. I don't need to make it cost-efficient, etc. With that said, the cold boot times for Cloud Functions are simply unbearable and not production-ready, averaging around 10 to 15 SECONDS for my boilerplate. I've certainly watched this video by Google (https://www.youtube.com/watch?v=IOXrwFqR6kY) that

Firebase redirect to same path name

一曲冷凌霜 提交于 2020-01-06 08:00:47
问题 How can I add a script or something similar in Firebase JSON file to redirect to a different domain but with the same path. For example: my users are currently visiting mydomain.com/help/page_id_1 Here page_id_1 is dynamic id's. I want to redirect to support.mydomain.com/help/page_id_1 Can I do this as a redirect in firebase.json file? 回答1: Yep! It'd look like this: { "hosting": { "redirects": [{ "source": "/help/:page", "destination": "https://support.mydomain.com/help/:page", "type": 301 }]

Firebase Cloud functions are not called

牧云@^-^@ 提交于 2020-01-06 04:35:30
问题 My site will call function "s" when I access " / s /: id". However, it is never actually called. As confirmed by firebase Project Overview, there is no evidence that function was called. I don't know why because there is no error in the console. #functions/firebase.json { "functions": { "source": "functions" }, "hosting": { "public": "dist", "ignore": ["firebase.json", "**/.*", "**/node_modules/**"], "rewrites": [ { "source": "/s/*", "function": "s" }, { "source": "**", "destination": "/index

How Do I Remove This Error in Firebase: “This domain is already in use.”?

一曲冷凌霜 提交于 2020-01-01 08:45:41
问题 I'm trying to add a custom domain to an existing project but keep getting the error that "this domain is already in use." I'm not using this domain anywhere else in any other project. There is only 1 other forum post (http://grokbase.com/t/gg/firebase-talk/165r5n78nq/firebase-domain-is-already-in-use) about this error but following the step provided leads to zero results. 回答1: If you are getting that error it means that you're already using the domain in a project. You probably deleted the

Rewrite routes from hosting to cloud functions from other regions than us-central1

天大地大妈咪最大 提交于 2019-12-31 12:59:48
问题 I have a http triggered cloud function deployed in the europe-west1 region and a web app hosted with firebase hosting. I have also setup a rewrite to that http function in my firebase.json file. I have noticed that the rewrite only works with us-central1 functions. Is there a way to make the rewrite work with europe-west1 functions? 回答1: Now that there is official support for other regions it states in the docs that " If you are using HTTP functions to serve dynamic content for hosting, you

How to host Flutter Web (Hummingbird) on Firebase Hosting

房东的猫 提交于 2019-12-30 07:24:12
问题 I created a flutter web project and work fine in localhost. So I planned to host the website in firebase. I followed the commands it deployed successfully but it shows only black screen in the console it shows error message. Error : Loading failed for the with source “https://myportfolioflutterweb.firebaseapp.com/web/main.dart.js”. SyntaxError: expected expression, got '<'[Learn More] My Project Structure : firebase.json : { "hosting": { "public": "public", "ignore": [ "firebase.json", "**/.*