bugsnag-js icon indicating copy to clipboard operation
bugsnag-js copied to clipboard

expo: Constants.installationId has been deprecated

Open dpolivy opened this issue 3 years ago • 12 comments

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 avatar Sep 10 '21 17:09 dpolivy

@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.

mattdyoung avatar Sep 13 '21 11:09 mattdyoung

Hi, Expo SDK 44 is about to be launched in a week. Any news on this ?

LinFeiLong avatar Dec 12 '21 17:12 LinFeiLong

Any news about it ?

freddneos avatar Dec 13 '21 09:12 freddneos

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.

mattdyoung avatar Dec 17 '21 00:12 mattdyoung

Following this issue.

syazwanz avatar Dec 23 '21 06:12 syazwanz

Following this issue.

Is this the only way to follow?

henskjold-vipo avatar Jan 12 '22 05:01 henskjold-vipo

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

mrmarktyy avatar Feb 17 '22 02:02 mrmarktyy

hi has there been any updates?

yasimoha avatar May 18 '22 09:05 yasimoha

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 👍

luke-belton avatar May 20 '22 14:05 luke-belton

how works with expo if we can not get the deviceId ?

brunolcarlos avatar Jun 24 '22 18:06 brunolcarlos

Hi @brunolcarlos - apologies but I'm not sure I fully understand your question, are you able to explain a bit more please?

luke-belton avatar Jun 28 '22 10:06 luke-belton