helium / maker-starter-app

Apache License 2.0
36 stars 38 forks source link

stuck at network setting when adding hotspot via maker app #34

Open tuannt1531 opened 2 years ago

tuannt1531 commented 2 years ago

Hi Teams, I am trying to build and use the maker app, when I try to add the hotspot feature, I can scan the hotspot and connect via BLE, but go to the network setting step, I can't scan wifi instead or choose to use ethernet or any whatever else it seems to be stuck here, while I can still add hotspot using helium app. Do you have any suggestions for this?. Does the maker app fully support adding the hotspot feature?

Thanks! image image

tyler-whitman commented 2 years ago

Hello, did you set up deep linking to integrate your maker app with the helium app? We have sdks to help with this process, which have been integrated into the maker starter app. These are the high level steps needed to add a hotspot to the network using a maker app.

You can find documentation on Wallet Link (deep linking) here: https://helium.github.io/react-native-helium/modules/WalletLink.html You can find documentation on the maker process here: https://docs.helium.com/mine-hnt/full-hotspots/become-a-maker/hotspot-integration-testing

tuannt1531 commented 2 years ago

thanks for your reply!

tyler-whitman commented 2 years ago

Thanks for more detail, the 404 error when checking the hotspot is expected as it has not been added to the blockchain yet. We just got another report of the same bug. It looks like in HotspotSetupWifiConnectingScreen.tsx the setWifi call is failing with the following error "Unknown Error" when providing the correct wifi password. Could your confirm if this is the same case for you?

tuannt1531 commented 2 years ago

Thanks for your reply! I don't scan wifi, I choose "Use Ethernet Instead" and it's stuck here, it doesn't pass to the HotspotSetupLocationInfoScreen screen.

after calling getHotspotDetails API, if hotspot is not added it will have to navigate to "HotspotSetupLocationInfoScreen" screen, right?

tuannt1531 commented 2 years ago

Thanks for more detail, the 404 error when checking the hotspot is expected as it has not been added to the blockchain yet. We just got another report of the same bug. It looks like in HotspotSetupWifiConnectingScreen.tsx the setWifi call is failing with the following error "Unknown Error" when providing the correct wifi password. Could your confirm if this is the same case for you?

I have a question:

tyler-whitman commented 2 years ago

Yes, a 404 is expected and await getHotspotDetails(hotspotAddress) will return undefined causing the app to navigate to the HotspotSetupLocationInfoScreen. This check is there to make sure you are not adding a hotspot which has already been added to the blockchain.

You are getting stuck at this point? Since there is no try/catch around the await getHotspotDetails(hotspotAddress) the error will be ignored. You can put a try catch around it and log what error you get (should be a 404). Also, you can log the value you get from await getHotspotDetails(hotspotAddress) that would be helpful in debugging.

What happens when you click the use ethernet button? The app is just stuck and doesn't proceed?

You should be looking at HotspotSetupPickWifiScreen.tsx line 100 is where the code should navigate to the next step. I have a feeling maybe your wallet link token is missing and that is why you dont proceed? You can see that check on line 91