Skip to content
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

Windows with device's SIM card fails #454

Closed
tero-paananen opened this issue Mar 22, 2021 · 5 comments · Fixed by #511
Closed

Windows with device's SIM card fails #454

tero-paananen opened this issue Mar 22, 2021 · 5 comments · Fixed by #511
Labels
bug Something isn't working released

Comments

@tero-paananen
Copy link
Contributor

tero-paananen commented Mar 22, 2021

Our customer reported that Windows device that uses 4g/5g network by device's SIM card fails into error on app start. App checks there internet connection using call const state: NetInfoState = await NetInfo.fetch();

Faulting module name: RNCNetInfoCPP.dll, version: 0.0.0.0, time stamp: 0x5fdc82d3
Exception code: 0xc0000005
Fault offset: 0x00000000000067b3

I don't have Windows with SIM card slot so i cannot test that more now, sorry.

Maybe RNCNetInfo.h.getCurrentState() fails to error?

Platforms

Windows 10

Versions

"@react-native-community/netinfo": "^5.9.2",
"react": "^16.14.0",
"react-native": "0.62.2"
"react-native-windows": "0.62.15"

@tero-paananen tero-paananen added the bug Something isn't working label Mar 22, 2021
@juhasuni
Copy link

juhasuni commented Mar 24, 2021

In Microsoft's own code example (https://docs.microsoft.com/en-us/previous-versions/windows/apps/hh452990(v=win.10)) the getInternetConnectionProfile call is within try-catch. The code example is in JavaScript, but I suppose it applies to C++ interfaces as well.

There's no try-catch in NetworkInfo.cpp:

m_profile = NetworkInformation::GetInternetConnectionProfile();

@mikehardy
Copy link
Contributor

@juhasuni PRs happily accepted 🙏

@tero-paananen
Copy link
Contributor Author

Finally PR created #511

mikehardy pushed a commit that referenced this issue Nov 4, 2021
…example app (#511)

* fix(windows) Uses rn-windows 0.65, fixes issue #454
* Set module windows target platform version
* New Windows example app on rn-win 0.65
@mikehardy
Copy link
Contributor

PR merged and should release in moments

github-actions bot pushed a commit that referenced this issue Nov 4, 2021
## [6.0.6](v6.0.5...v6.0.6) (2021-11-04)

### Bug Fixes

* **windows, crash:** try/catch fetching network profile, new windows example app ([#511](#511)) ([ef3ac76](ef3ac76)), closes [#454](#454)
@matt-oakes
Copy link
Collaborator

🎉 This issue has been resolved in version 6.0.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants