Basemap loading stopped working after switch over to TLS.

883
10
05-14-2019 04:42 PM
ITS_JohnColaneri
New Contributor

I seem to have gotten my Visual Studio 17, Xamarin Android project torqued into some untenable position. When I try to load a Basemap, it throws the following error:

05-14 13:59:33.724 2047 2106 E ArcGIS Runtime: Failed to explicitly load ArcGIS Runtime core library, Exception details: Library runtimecore not found; tried [/system/lib/libruntimecore.so, /system/vendor/lib/libruntimecore.so]
05-14 13:59:33.724 2047 2106 E ArcGIS Runtime: at Java.Interop.JniEnvironment+StaticMethods.CallStaticVoidMethod (Java.Interop.JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x00069] in <034d4a9852dd45bea9353cc7776c99f0>:0
05-14 13:59:33.724 2047 2106 E ArcGIS Runtime: at Java.Interop.JniPeerMembers+JniStaticMethods.InvokeVoidMethod (System.String encodedMember, Java.Interop.JniArgumentValue* parameters) [0x00018] in <034d4a9852dd45bea9353cc7776c99f0>:0
05-14 13:59:33.724 2047 2106 E ArcGIS Runtime: at Java.Lang.JavaSystem.LoadLibrary (System.String libname) [0x00029] in <a10f61e70eeb434e952fef884856c199>:0
05-14 13:59:33.724 2047 2106 E ArcGIS Runtime: at Esri.ArcGISRuntime.ArcGISRuntimeEnvironment.Initialize () [0x00012] in C:\daily_r\api_xam\dotnet\api\src\Esri.ArcGISRuntime\Esri.ArcGISRuntime.Shared\ArcGISRuntimeEnvironment.cs:104
05-14 13:59:33.724 2047 2106 E ArcGIS Runtime: --- End of managed Java.Lang.UnsatisfiedLinkError stack trace ---
05-14 13:59:33.724 2047 2106 E ArcGIS Runtime: java.lang.UnsatisfiedLinkError: Library runtimecore not found; tried [/system/lib/libruntimecore.so, /system/vendor/lib/libruntimecore.so]
05-14 13:59:33.724 2047 2106 E ArcGIS Runtime: at java.lang.Runtime.loadLibrary0(Runtime.java:1040)
05-14 13:59:33.724 2047 2106 E ArcGIS Runtime: at java.lang.System.loadLibrary(System.java:1657)

I've used Android device monitor to look for these libraries, and indeed, they are not there on the device. The thing is, everything was *working* before April 16. Anyone have any ideas about how to chase this down? Also, probably relevant that I have another incarnation of the same project that does load the Basemap on the same phone (it has something else broken in it that makes it unusable..)
 

0 Kudos
10 Replies
MichaelBranscomb
Esri Frequent Contributor

Hi,

Have you followed the guidelines in https://docs.microsoft.com/en-us/xamarin/android/app-fundamentals/http-stack?tabs=windows ?

TLS 1.2 related advice for ArcGIS Runtime SDK for .NET

It's also possible you just need to uninstall the app from your development/test device before re-deploying.

Cheers

Mike

0 Kudos
ITS_JohnColaneri
New Contributor

Hi Mike,

I have already done both of those things, a month ago.

John Colaneri

Information Technology Services (CalFIRE ITS)

California Department of Forestry and Fire Protection

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

John,

Can you share more information about your Android project settings, minimum/target OS, test device, etc?

This shouldn't be necessary - but have you already tried the load library call in https://community.esri.com/message/762607-re-systemdllnotfoundexception-libruntimecorenet ?

Cheers

Mike

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

John,

There is some additional advice in this thread that might help: https://community.esri.com/message/766794-re-arcgis-runtime-10021-crashes-on-android-80-api-26

Cheers

Mike

0 Kudos
ITS_JohnColaneri
New Contributor

Hi Mike,

Minimum Android version is level 21, Target Android version is level 27. I’m usually running on a Samsung Galaxy S8. I’ve also run the same issues on a Samsung Galaxy Tab 4. The NuGets are Esri.ArcGISRuntime.Tookit v100.4.0, and Esri.ArcGISRuntime.Xamarin.Android v100.5.0.

I have not tried loading libraries manually. Might take me a non-trivial expenditure of effort to figure out how to do that in C#. Is that sort of thing not usually done through the Solution Explorer under References?

In any event, I’ve surfed around the file system on the device with Android Device Monitor, and looked in the locations mentioned in the Java error dump from the original post. Indeed the libraries in question are not there..

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

John,

Have you tried the steps in https://community.esri.com/thread/213518-arcgis-runtime-10021-crashes-on-android-80-api-26 ?

Regarding the load library call, it shouldn't be necessary to make that call manually (programmatically) - but if it works then it may point to an issue in our initialization. 

Cheers

Mike

0 Kudos
ITS_JohnColaneri
New Contributor

Hmm.. The steps delineated in that post produced the following error output:

1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2053,5): error MSB4018: The "LinkAssemblies" task failed unexpectedly.

1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2053,5): error MSB4018: Mono.Linker.MarkException: Error processing method: 'System.Boolean Esri.ArcGISRuntime.Security.ServerInfo::SameDomain(System.Uri,System.Uri)' in assembly: 'Esri.ArcGISRuntime.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.String[] System.String::Split(System.Char,System.StringSplitOptions)

1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2053,5): error MSB4018:    at Mono.Linker.Steps.MarkStep.HandleUnresolvedMethod(MethodReference reference)

1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2053,5): error MSB4018:    at Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference)

1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2053,5): error MSB4018:    at Mono.Linker.Steps.MarkStep.MarkInstruction(Instruction instruction)

1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2053,5): error MSB4018:    at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body)

1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2053,5): error MSB4018:    at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)

1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2053,5): error MSB4018:    at Mono.Linker.Steps.MarkStep.ProcessQueue()

1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2053,5): error MSB4018:    --- End of inner exception stack trace ---

1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2053,5): error MSB4018:    at Mono.Linker.Steps.MarkStep.ProcessQueue()

1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2053,5): error MSB4018:    at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue()

1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2053,5): error MSB4018:    at Mono.Linker.Steps.MarkStep.Process()

1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2053,5): error MSB4018:    at MonoDroid.Tuner.MonoDroidMarkStep.Process(LinkContext context)

1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2053,5): error MSB4018:    at Mono.Linker.Pipeline.Process(LinkContext context)

1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2053,5): error MSB4018:    at MonoDroid.Tuner.Linker.Process(LinkerOptions options, ILogger logger, LinkContext& context)

1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2053,5): error MSB4018:    at Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res)

1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2053,5): error MSB4018:    at Xamarin.Android.Tasks.LinkAssemblies.Execute()

1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2053,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()

1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2053,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()

========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

 

 

This bit:

 

… in assembly: 'Esri.ArcGISRuntime.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.String[] System.String::Split(System.Char,System.StringSplitOptions)…

 

Looks familiar. The part after “Failed to resolve” is the incomprehensible error output -e.Message- from the Exception thrown during execution..

 

J

0 Kudos
MichaelBranscomb
Esri Frequent Contributor
0 Kudos
ITS_JohnColaneri
New Contributor

Hmm.. I don’t think so. I’m set up with Linking: Sdk Assemblies Only. If I’m reading the article correctly, the (GC like) Linker should skip over the Esri libraries. Did I misinterpret what I read? Thanks.

JC

0 Kudos