Restoring expo-cli functionality to what it used to be

There has been breaking changes in expo-cli that cause at least my current workflow to stop functioning as it did before. I opened issue in github:
https://github.com/expo/expo-cli/issues/1081

And I also have asked help with that few times in Slack, but there hasn’t been anyone around who could’ve helped. So trying if forums get attention so I can get this fixed.

As it is mentioned in issue, having option to choose which address Expo DevTools bind would solve problem. However, I don’t understand all of those changes made in #1008 to increase security, so I don’t get pull request done without a bit of help.

Question here is what else there needs to be changed than have simple if/else functionality to check if there is env variable given or not, and bind accordingly? As is seen in issue #1081, I tried forking & making those changes, but that code in that branch results giving only black background on browser, without any content. So it listens correctly, but I suspect those additional security measures are still borked.

I’m also not sure what is best workflow to develop expo-cli & try things out. Like… what is easiest method to try out your own changes while developing. I’ve done quite much manual mangling, which feels quite wrong, but I’ve not found good source for better information this far.

Any help is highly appreciated, as I want to get back into building my expo app. :slight_smile:

Hi.

As a workaround until this is fixed, perhaps you could do something like this?

ssh -L 19002:localhost:19002 dockeruser@containeraddress

Then browse to localhost:19002.

With your patch applied, do you get any errors in the browser’s devtools console?
I suspect the client-side code is still trying to connect to localhost, so you might try searching for “localhost” in the code and modifying it as appropriate.

I have not done much patching/testing of expo-cli myself, so not sure I am the best person to offer advice on the best way to go about it, but I’ve had success with the following method before:

Thank you wodin, I’ll give that ssh tunneling a go. That was actually one of my first ideas, and most likely if it would be just me, I’d leave it like that. But as I have people with less tech knowledge in team, I like to get all work as streamlined as possible. Docker does that nicely.

I did changes in few places in expo-cli code where it was hardcoded to have localhost. All places which were touched in original pull request that made this change. Doing those changes results indeed black background, and no errors in browser console, which made it difficult for me to continue. So it clearly connects, and gets some content, but something is missing.

When you say client-side code, do you mean parts in expo-cli, or some other part of these tools, that I didn’t realize to check, and might not have been referenced in that pull request?

By client-side code I mean the JavaScript that runs in the browser when you browse to http://localhost:19002

Hopefully @fson or one of the other Expo team members can offer you some better advice on how to improve/debug your pull request.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.