Giter VIP home page Giter VIP logo

Comments (13)

kartikgreen avatar kartikgreen commented on July 25, 2024 17

I have the same problem. Can someone help?

from functions-samples.

kuboon avatar kuboon commented on July 25, 2024 2

cors(req, res, async () => {

passing async function to third parameter of cors does not work because it does not return the promise object.

https://github.com/expressjs/cors/blob/master/lib/index.js#L188

It may cause the problem.

from functions-samples.

pramodarya91 avatar pramodarya91 commented on July 25, 2024 1

I also Face the same issue , so till now did any one resolved this issue .?

from functions-samples.

nicolasgarnier avatar nicolasgarnier commented on July 25, 2024

It seems there is a 500 error returned. Can you check the Function log (in the Firebase console) to see if there is more info about these 500 errors? in case that helps...

from functions-samples.

katowulf avatar katowulf commented on July 25, 2024

Hi Frank, This doesn't look like an issue with the firebase-samples repo. Would you mind putting this question on Stack Overflow or reaching out to support? ☼, Kato

from functions-samples.

xerosanyam avatar xerosanyam commented on July 25, 2024

is cors module necessary ?

from functions-samples.

ysoufian avatar ysoufian commented on July 25, 2024

hi did you resolve this issue?
I am also having the same issue

from functions-samples.

williamgoodhew avatar williamgoodhew commented on July 25, 2024

I am having the same issue as well. How did you resolve the problem?

from functions-samples.

ysoufian avatar ysoufian commented on July 25, 2024

it was a cors issue.

const cors = require('cors');
const corsOptions = {
origin: '*',
allowedHeaders: ['Content-Type', 'Authorization', 'Content-Length', 'X-Requested-With', 'Accept'],
methods: ['GET', 'PUT', 'POST', 'DELETE', 'OPTIONS'],
optionsSuccessStatus: 200 // some legacy browsers (IE11, various SmartTVs) choke on 204
};

app.use(cors(corsOptions));
app.get('/portfolio', cors(corsOptions), (() => {
// rest of the code here.
}

from functions-samples.

williamgoodhew avatar williamgoodhew commented on July 25, 2024

from functions-samples.

ysoufian avatar ysoufian commented on July 25, 2024

I am not sure what you are trying to do but I believe the code I pasted will allow you to call methods on the Express application regardless of what the app/function does (access DB or not).

from functions-samples.

PradeepAppinventiv avatar PradeepAppinventiv commented on July 25, 2024

I have the same problem. Can someone help?
how to solve this

from functions-samples.

PradeepAppinventiv avatar PradeepAppinventiv commented on July 25, 2024

hi did you resolve this issue?
I am also having the same issue

hii if your issue resolve please let me know..

from functions-samples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.