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

Only works for arm7 #36

Open
Jamesfleming1 opened this issue Jul 1, 2021 · 9 comments
Open

Only works for arm7 #36

Jamesfleming1 opened this issue Jul 1, 2021 · 9 comments
Labels
enhancement New feature or request

Comments

@Jamesfleming1
Copy link

Whenever I set the target architecture to arm7 every works as expected. But if I try to build for arm64 the web browser crashes the app upon loading. Is there something that requires it to be build for arm7 or just a setting somewhere that I am missing that would allow it to be built for arm64

@IanPhilips
Copy link
Owner

Hmmmm I know that I only included the gecko engine library for arm7. You can download the engine for other architectures here. I don't remember any specific reason why the plugin might not work other than that. Will the Oculus SDK work with other architectures?

@IanPhilips IanPhilips added the enhancement New feature or request label Jul 4, 2021
@Jamesfleming1
Copy link
Author

Hmm okay. I downloaded the .aar from https://maven.mozilla.org/maven2/?prefix=maven2/org/mozilla/geckoview/geckoview-arm64-v8a/90.0.20210705185941/, put it into the proper folder in unity.

Then I changed the build.gradle in GeckoViewPlugin/app/build.gradle to have
implementation "org.mozilla.geckoview:geckoview${geckoviewChannel}-arm64-v8a:${geckoviewVersion}" with the proper geckoviewVersion

However building my unity project it still crashes... Am I missing something? Do I need to build something outside of unity? something from the GeckoViewPlugin?

@Jamesfleming1
Copy link
Author

FATAL EXCEPTION: Gecko
07-08 16:22:28.548 10431 10564 E AndroidRuntime: Process: com.DartmouthSILVR.QuickSilvr, PID: 10431
07-08 16:22:28.548 10431 10564 E AndroidRuntime: java.lang.RuntimeException: LOAD mozglue: ABI: unknown (0x0), arm64-v8a: Data: /data/user/0/com.DartmouthSILVR.QuickSilvr, ax=false, ddx=false, -1x=false, -2x=false, nativeLib: /data/app/com.DartmouthSILVR.QuickSilvr-2SCL0Zqm8nNJlrbg5wOCFw==/lib/arm64, dirx=true, libx=false
07-08 16:22:28.548 10431 10564 E AndroidRuntime: at org.mozilla.gecko.mozglue.GeckoLoader.doLoadLibrary(GeckoLoader.java:468)
07-08 16:22:28.548 10431 10564 E AndroidRuntime: at org.mozilla.gecko.mozglue.GeckoLoader.loadMozGlue(GeckoLoader.java:476)
07-08 16:22:28.548 10431 10564 E AndroidRuntime: at org.mozilla.gecko.GeckoThread.run(GeckoThread.java:421)
07-08 16:22:28.548 10431 10564 E AndroidRuntime: Caused by: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.DartmouthSILVR.QuickSilvr-2SCL0Zqm8nNJlrbg5wOCFw==/base.apk"],nativeLibraryDirectories=[/data/app/com.DartmouthSILVR.QuickSilvr-2SCL0Zqm8nNJlrbg5wOCFw==/lib/arm64, /data/app/com.DartmouthSILVR.QuickSilvr-2SCL0Zqm8nNJlrbg5wOCFw==/base.apk!/lib/arm64-v8a, /system/lib64, /system/product/lib64]]] couldn't find "libmozglue.so"

Here are my error logs, looks like it can't find "libmozglue.so"

@IanPhilips
Copy link
Owner

Hm if that's not a library you can include like I did here (those are libraries the gecko engine asked for) you could try asking in Bugzilla about that error when using their library in Unity.

@Jamesfleming1
Copy link
Author

Where did you get those libraries? All I did was switch out the .aar file but maybe I need to switch out all of those libraries to arm64 versions. I didn't see any of those files where I got the .aar from https://maven.mozilla.org/maven2/?prefix=maven2/org/mozilla/geckoview/

@IanPhilips
Copy link
Owner

I don't remember exactly where I got them but from a quick google search I see they're available to download (common-1.1.1.jar. Have you tried searching for libmozglue.so?

@toki1
Copy link

toki1 commented Nov 1, 2022

using gecko version 80 seems to work for me

@IanPhilips
Copy link
Owner

using gecko version 80 seems to work for me

Do you mean the latest version (98) in my PR #43 ?

@JimothyMarmalade
Copy link

@Jamesfleming1
I found a fix for the application crashing on ARM64.

I was able to get around this issue fairly easily by deleting the GeckoView ARMv7 plugin from the project files and replacing it with the ARM64 plugin marked with the same version number.

At the time of writing, the correct file to use is "geckoview-arm64-v8a-80.0.20200818235255.aar" from the geckoview download page.

From my experimentation with the browser plugin, the build doesn't actively use the GeckoViewPlugin folder included in the repository -- I can delete that entire folder and the project builds/runs as expected. I think you'd have to recompile the plugin after changing the specified version number in order to see a difference, but just replacing the file with this specific version is a way to fix the issue without doing a deep dive like that.

Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants