-
Notifications
You must be signed in to change notification settings - Fork 388
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
Getiing following error when launching salesforce mobile sdk based hybrid app on android platform #2619
Comments
Is it happening only on Android 35? |
it's happening on Android 34 as well |
The loading of SQLCipher library happens in DBOpenHelper: see https://github.com/forcedotcom/SalesforceMobileSDK-Android/blob/dev/libs/SmartStore/src/com/salesforce/androidsdk/smartstore/store/DBOpenHelper.java#L194 |
After further investigation we found that the app is running fine on Android Studio Jellyfish version and crashing on Kuala and Ladybug versions |
Is there any update for this issue? |
I have not seen this issue with 12.1.1 running Kuala or Ladybug, perhaps try that? 12.2 will be releasing very soon as well. |
I was able to reproduce this using Android Studio Ladybug 2024.2.1 Patch 1 on macOS 14.7 and the Google Play Android Emulator for both API 26 and API 35. The interesting thing is it works without the error on my real Google Pixel 9 Pro API 34. Could this issue be specific to the Android emulator? The dependency is declared on the SmartStore dependency. It works consistently when I add the |
@hemantsumanmetacube - How is your project resolving SalesforceHybrid in Gradle? At Salesforce, our samples and templates used to build that from included local sources. We switched to depending on pre-compiled, hosted binaries. I noticed the older way of using a local build exhibits this issue. The newer way of using the hosted, pre-compiled binaries works A-OK. I'm not certain of the exact reason yet, but thought I'd share early if it helps you. Here's the difference in Gradle.
|
We are referencing local resources, because we have added some custom changes, and thus we can not use hosted libraries. |
@JohnsonEricAtSalesforce In which file are you adding |
Thanks for the reply, @hemantsumanmetacube. That helps solidify the theory that there's something different about how the native library is picked up in these two different dependency styles. I added SQLCipher as an API dependency in the app's build.gradle.kts exactly as it is also declared in the SmartStore library's build.gradle.kts. When building from hosted resources, SmartStore provides SQLCipher as a transitive dependency including the native portion. It's interesting that this project dependency on local SmartStore sources does not. I noticed this issue in MSDK's AccountEditor hybrid sample app during 12.2 regression testing. So, that will get a similar fix as well. Let me know if this doesn't work and we'll see what we can do. |
@hemantsumanmetacube - It's still in review, but there is also a more robust fix for this in the works. Feel to view this code and, if needed, incorporate into your app's local sources. |
Getting this error after adding api("net.zetetic:sqlcipher-android:4.6.1") [rpc_manager] SetConsent failed with status: gbzy{code=PERMISSION_DENIED, description=The caller does not have permission, cause=null} |
Please fill out the following details:
java.lang.UnsatisfiedLinkError: No implementation found for long net.zetetic.database.sqlcipher.SQLiteConnection.nativeOpen(java.lang.String, int, java.lang.String, boolean, boolean) (tried Java_net_zetetic_database_sqlcipher_SQLiteConnection_nativeOpen and Java_net_zetetic_database_sqlcipher_SQLiteConnection_nativeOpen__Ljava_lang_String_2ILjava_lang_String_2ZZ) - is the library loaded, e.g. System.loadLibrary?
at net.zetetic.database.sqlcipher.SQLiteConnection.nativeOpen(Native Method)
at net.zetetic.database.sqlcipher.SQLiteConnection.open(SQLiteConnection.java:226)
at net.zetetic.database.sqlcipher.SQLiteConnection.open(SQLiteConnection.java:202)
at net.zetetic.database.sqlcipher.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:475)
at net.zetetic.database.sqlcipher.SQLiteConnectionPool.open(SQLiteConnectionPool.java:189)
at net.zetetic.database.sqlcipher.SQLiteConnectionPool.open(SQLiteConnectionPool.java:181)
at net.zetetic.database.sqlcipher.SQLiteDatabase.openInner(SQLiteDatabase.java:1028)
at net.zetetic.database.sqlcipher.SQLiteDatabase.open(SQLiteDatabase.java:1013)
at net.zetetic.database.sqlcipher.SQLiteDatabase.openDatabase(SQLiteDatabase.java:840)
at net.zetetic.database.sqlcipher.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:359)
at net.zetetic.database.sqlcipher.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:278)
at com.salesforce.androidsdk.smartstore.store.SmartStore.getDatabase(SmartStore.java:207)
at com.salesforce.androidsdk.smartstore.store.SmartStore.clearSoup(SmartStore.java:614)
at com.salesforce.androidsdk.phonegap.plugin.SmartStorePlugin.clearSoup(SmartStorePlugin.java:559)
at com.salesforce.androidsdk.phonegap.plugin.SmartStorePlugin.-$$Nest$mclearSoup(Unknown Source:0)
at com.salesforce.androidsdk.phonegap.plugin.SmartStorePlugin$1.run(SmartStorePlugin.java:150)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)
2024-09-24 15:57:07.081 5415-5543 AndroidRuntime com.tier1crm.tier1mobilenow E FATAL EXCEPTION: pool-5-thread-4
Process: com.tier1crm.tier1mobilenow, PID: 5415
java.lang.UnsatisfiedLinkError: No implementation found for long net.zetetic.database.sqlcipher.SQLiteConnection.nativeOpen(java.lang.String, int, java.lang.String, boolean, boolean) (tried Java_net_zetetic_database_sqlcipher_SQLiteConnection_nativeOpen and Java_net_zetetic_database_sqlcipher_SQLiteConnection_nativeOpen__Ljava_lang_String_2ILjava_lang_String_2ZZ) - is the library loaded, e.g. System.loadLibrary?
at net.zetetic.database.sqlcipher.SQLiteConnection.nativeOpen(Native Method)
at net.zetetic.database.sqlcipher.SQLiteConnection.open(SQLiteConnection.java:226)
at net.zetetic.database.sqlcipher.SQLiteConnection.open(SQLiteConnection.java:202)
at net.zetetic.database.sqlcipher.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:475)
at net.zetetic.database.sqlcipher.SQLiteConnectionPool.open(SQLiteConnectionPool.java:189)
at net.zetetic.database.sqlcipher.SQLiteConnectionPool.open(SQLiteConnectionPool.java:181)
at net.zetetic.database.sqlcipher.SQLiteDatabase.openInner(SQLiteDatabase.java:1028)
at net.zetetic.database.sqlcipher.SQLiteDatabase.open(SQLiteDatabase.java:1013)
at net.zetetic.database.sqlcipher.SQLiteDatabase.openDatabase(SQLiteDatabase.java:840)
at net.zetetic.database.sqlcipher.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:359)
at net.zetetic.database.sqlcipher.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:278)
at com.salesforce.androidsdk.smartstore.store.SmartStore.getDatabase(SmartStore.java:207)
at com.salesforce.androidsdk.smartstore.store.SmartStore.clearSoup(SmartStore.java:614)
at com.salesforce.androidsdk.phonegap.plugin.SmartStorePlugin.clearSoup(SmartStorePlugin.java:559)
at com.salesforce.androidsdk.phonegap.plugin.SmartStorePlugin.-$$Nest$mclearSoup(Unknown Source:0)
at com.salesforce.androidsdk.phonegap.plugin.SmartStorePlugin$1.run(SmartStorePlugin.java:150)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)
The text was updated successfully, but these errors were encountered: