Skip to content

Template for Firebase with working local functions emulator #6522

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

Closed
AaronBeaudoin opened this issue Nov 2, 2021 · 6 comments
Closed

Template for Firebase with working local functions emulator #6522

AaronBeaudoin opened this issue Nov 2, 2021 · 6 comments

Comments

@AaronBeaudoin
Copy link

AaronBeaudoin commented Nov 2, 2021

I've tried setting up a dev environment I use locally for developing a Nuxt.js website which utilizes Firebase Functions in Gitpod but I've been unsuccessful due to issues connecting my app with the Firebase emulator suite.

The issue seems to be that firebase is trying to access the functions emulator via HTTP, but since the exposed port URL is served over HTTPS I get a mixed content error. Would it be possible for someone to confirm that a minimal Firebase dev environment with a local emulator suite is even possible at the moment with Gitpod? I don't really know for sure that I'm not just doing something wrong.

I believe if I had a template with a working implementation I could use that to figure out why my setup isn't working.

@AaronBeaudoin
Copy link
Author

AaronBeaudoin commented Nov 30, 2021

Discovered the root problem and made a separate more targeted issue (#6687).

@Methodician
Copy link

@AaronBeaudoin so did you manage to get the emulator suite running?

@AaronBeaudoin
Copy link
Author

AaronBeaudoin commented Apr 22, 2022

@Methodician Unfortunately in the end I found that Gitpod was getting in the way of my development experience more than it was helping, so I abandoned trying to get it working for my company and focused on improving my local development experience instead. It's just as well, because the "more targeted issue" I created ended up being closed because nobody ever did anything with it.

@axonasif
Copy link
Member

axonasif commented Apr 25, 2022

Hey @AaronBeaudoin, really sorry to hear that 😓
I do not have experience of what you described but I'm guessing that locally opening your workspace in your desktop vscode where all ports are forwarded to http://localhost might work for you.

Please see https://www.gitpod.io/docs/ides-and-editors/vscode

It might be worth giving it a last spin, feel free to join our discord server from here, we can discuss more there 🙏

@Methodician
Copy link

So, I'm not particularly adept with port forwarding and CORS issues and all of that, but I do feel motivated to try and make Gitpod work for my companies, so long as the gitpod team is willing to help out.

I usually use Gitpod in VSCode locally anyway for other reasons, and can confirm it does not help the issue. It looks to me like there is just a huge jumble of ports being created and re-routed on both ends, web sockets failing, and something is not lining up quite right. If I can be of more help, I'm willing to put a bit more effort into this before going the way of @AaronBeaudoin and just optimizing our codebases and workflows for local development.

Here's what the my browser spits out when I try to use the emulator suite UI:
Emulator suite browser logs

And here is what I see in gitpod (browser) vs gitpod (locally in VSCode):
image

@Methodician
Copy link

It's funny, I find myself giving Gitpod to see what progress has been made, and coming across this same problem. I totally forgot I had participated in this discussion, and found this by searching. I really would like to make this work. I love the idea of Gitpod and for a select few things it's fantastic, but there needs to be a little more magic to over come this bad magic, or a little less magic so we can just understand, debug, and configure things manually.

@axonasif do you know if any progress has been made in this direction?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants