question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

getInstallReferrer does not work

See original GitHub issue

Summary

getInstallReferrer stopped working in our quite sometime ago.

Version 8.1.3
Affected OS android
OS Version all
Installereferrer library version 2.2

Current behavior

Logcat shows this error(I added a printstacktrace to see what the full error was):

2021-05-24 23:43:48.752 21112-21188/? W/System.err: RNInstallReferrerClient exception. getInstallReferrer will be unavailable: com.android.installreferrer.a.a.newBuilder [class android.content.Context]
2021-05-24 23:43:48.752 21112-21188/? W/System.err: java.lang.NoSuchMethodException: com.android.installreferrer.a.a.newBuilder [class android.content.Context]
2021-05-24 23:43:48.756 21112-21188/? W/System.err:     at java.lang.Class.getMethod(Class.java:2072)
2021-05-24 23:43:48.756 21112-21188/? W/System.err:     at java.lang.Class.getMethod(Class.java:1693)
2021-05-24 23:43:48.756 21112-21188/? W/System.err:     at com.learnium.RNDeviceInfo.c.<init>(RNInstallReferrerClient.java:4)
2021-05-24 23:43:48.756 21112-21188/? W/System.err:     at com.learnium.RNDeviceInfo.RNDeviceModule.<init>(RNDeviceModule.java:7)
2021-05-24 23:43:48.756 21112-21188/? W/System.err:     at com.learnium.RNDeviceInfo.b.createNativeModules(RNDeviceInfo.java:2)
2021-05-24 23:43:48.756 21112-21188/? W/System.err:     at com.facebook.react.s.a(ReactPackageHelper.java:7)
2021-05-24 23:43:48.756 21112-21188/? W/System.err:     at com.facebook.react.f.b(NativeModuleRegistryBuilder.java:8)
2021-05-24 23:43:48.756 21112-21188/? W/System.err:     at com.facebook.react.m.P(ReactInstanceManager.java:6)
2021-05-24 23:43:48.756 21112-21188/? W/System.err:     at com.facebook.react.m.Q(ReactInstanceManager.java:8)
2021-05-24 23:43:48.756 21112-21188/? W/System.err:     at com.facebook.react.m.q(ReactInstanceManager.java:6)
2021-05-24 23:43:48.757 21112-21188/? W/System.err:     at com.facebook.react.m.c(ReactInstanceManager.java:1)
2021-05-24 23:43:48.757 21112-21188/? W/System.err:     at com.facebook.react.m$e.run(ReactInstanceManager.java:12)
2021-05-24 23:43:48.757 21112-21188/? W/System.err:     at java.lang.Thread.run(Thread.java:919)

Expected behavior

It should show the referrer. I tested the google implementation with the code sample, and it works. So it seems something about the reflection is a problem, probably, especially because of com.android.installreferrer.a.a.newBuilder. The path seems to be different from the actual class.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
heroiccommented, May 24, 2021

Got it working by adding this to the proguard config. Will add this to the README in a PR

-keepclassmembers class com.android.installreferrer.api.** {
  *;
}
0reactions
rndi-botcommented, Jul 21, 2021

🎉 This issue has been resolved in version 8.1.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Read more comments on GitHub >

github_iconTop Results From Across the Web

Play Install Referrer Library not working in Play Store live app
However, when I upload the app to the Play Store, no referrer links are being saved to the database, although the app is...
Read more >
Play Install Referrer Library - Android Developers
This guide covers the basics of retrieving referral information from Google Play using the Play Install Referrer Library. Note: If you are ......
Read more >
react-native-device-info - npm
Returns an object of platform-specfic location providers/servcies, with boolean value whether or not they are currently available. NOTE: This ...
Read more >
How to Use Google Play Install Referrer API in Android?
Google Play Install Referrer is the API that is used in most of the applications but it is not been seen in the...
Read more >
Android - Is it possible to get install referrer programmatically
Android : Android - Is it possible to get install referrer programmatically ... If there any issues, contact us on - htfyc dot...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found