bugsnag-js
bugsnag-js copied to clipboard
expo: Constants.installationId has been deprecated
I am using expo SDK 42 and just updated to the latest @bugsnag/expo to fix some other issues. Now, I am getting the following warning on app startup.
Constants.installationId has been deprecated in favor of generating and storing your own ID. Implement it using expo-application's androidId on Android and a storage API such as expo-secure-store on iOS and localStorage on the web. This API will be removed in SDK 44. at node_modules/react-native/Libraries/LogBox/LogBox.js:117:10 in registerWarning at node_modules/react-native/Libraries/LogBox/LogBox.js:63:8 in warnImpl at node_modules/react-native/Libraries/LogBox/LogBox.js:36:4 in console.warn at node_modules/expo/build/environment/react-native-logs.fx.js:18:4 in warn at node_modules/expo-constants/build/Constants.js:52:12 in constants.get__installationId at node_modules/@bugsnag/plugin-expo-device/device.js:25:19 in module.exports.load at node_modules/@bugsnag/core/client.js:162:19 in Client#_loadPlugin at node_modules/@bugsnag/core/client.js:63:14 in map$argument_1 at node_modules/@bugsnag/core/lib/es-utils/map.js:5:54 in reduce$argument_1 at node_modules/@bugsnag/core/lib/es-utils/reduce.js:4:58 in module.exports at node_modules/@bugsnag/core/lib/es-utils/map.js:5:8 in module.exports at node_modules/@bugsnag/core/client.js:62:7 in Client#constructor at node_modules/@bugsnag/expo/src/notifier.js:59:20 in Bugsnag.createClient at node_modules/@bugsnag/expo/src/notifier.js:74:22 in Bugsnag.start at App.js:11:0 in
This is coming from here: https://github.com/bugsnag/bugsnag-js/blob/8f3466e4cfb144aa64bbc3cfa079ce58a4b860d4/packages/plugin-expo-device/device.js#L25
Any chance of getting this updated to avoid the warning?
@dpolivy
The warning is because @bugsnag/expo currently uses installationId
which is due to be removed in Expo SDK 44.
We are already looking at how we could replace the functionality which uses installationId
with an alternative approach and plan to resolve this before Expo SDK 44 is released. We'll provide an update here when our changes are released.
For the time being this warning can safely be ignored. It's just warning about the deprecation but installationId
is still available in Expo SDK 42.
Hi, Expo SDK 44 is about to be launched in a week. Any news on this ?
Any news about it ?
We've been in touch with the Expo team to describe our usage and installationId
has been un-deprecated for the time being, until sufficient support is available for us to implement our own replacement:
https://github.com/expo/expo/pull/15280#issue-1061004063
Also due to limited external solution for
installationId
replacement, it was decided to un-deprecate this field for a while.
Following this issue.
Following this issue.
Is this the only way to follow?
We've been in touch with the Expo team to describe our usage and
installationId
has been un-deprecated for the time being, until sufficient support is available for us to implement our own replacement: expo/expo#15280 (comment)Also due to limited external solution for
installationId
replacement, it was decided to un-deprecate this field for a while.
Thanks for the updates bro
hi has there been any updates?
Hi @yasimoha - no updates for this at the moment I'm afraid. This is still on our backlog though and as above, we're waiting on Expo to make some changes before we're able to implement our own replacement. We'll keep this thread updated 👍
how works with expo if we can not get the deviceId ?
Hi @brunolcarlos - apologies but I'm not sure I fully understand your question, are you able to explain a bit more please?