Not logged in. · Lost password · Register
Forum: MatriX RSS
Avatar
sunkas85 #1
Member since Aug 2012 · 6 posts
Group memberships: Members
Show profile · Link to this post
Subject: Error in Android: No JNI_OnLoad found in /system/lib/libc.so 0x413bbd68, skipping init
Tried to connect to a normal OpenFire xmpp server using matrix Mono build. In Unity it works just fine and connects. However, when building for Android it produces the a Matrix.ExceptionEventArgs exception (in OnError method with message "getifaddrs").

The log also produces the following error before calling OnError:

D/dalvikvm(18926): No JNI_OnLoad found in /system/lib/libc.so 0x413bbd68, skipping init

This when calling xmppClient.Open()

Any thoughts?

Best Regards
Jonas Andersson
Avatar
Alex #2
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
looks like unity fails when MatriX is looking up the IP address information.

You can try:

  1. xmppClient.ResolveSrvRecords = false;
  2. xmppClient.Hostname = "your_host_or_ip";
Avatar
sunkas85 #3
Member since Aug 2012 · 6 posts
Group memberships: Members
Show profile · Link to this post
Thanks!

It does not however seem to do any difference. This is the code I use:

  1. void setup () {
  2.         xmppClient  = new XmppClient()
  3.             {
  4.                Password = "pass",
  5.                 Username = "user2",
  6.                 XmppDomain = "xxx.xxx.se",
  7.                 Status = "Online",
  8.                 Show = Show.chat,
  9.                 Port = 5222,
  10.                 StartTls = false,
  11.                 Hostname = "xxx.xxx.se",
  12.             };
  13.         xmppClient.ResolveSrvRecords = false;
  14.  
  15.         // Event handlers for Matrix
  16.         xmppClient.OnBeforeSasl += xmppClient_OnBeforeSasl;
  17.         xmppClient.OnLogin += this.xmppClient_OnLogin;
  18.         xmppClient.OnAuthError += this.xmppClient_OnAuthError;
  19.         xmppClient.OnError += this.xmppClient_OnError;
  20.        
  21.         xmppClient.OnRosterStart += this.xmppClient_OnRosterStart;
  22.         xmppClient.OnRosterItem += this.xmppClient_OnRosterItem;
  23.         xmppClient.OnRosterEnd += this.xmppClient_OnRosterEnd;
  24.         xmppClient.OnReceiveXml += this.xmppClient_OnReceiveXml;
  25.         xmppClient.OnSendXml += this.xmppClient_OnSendXml;
  26.         
  27.             try
  28.             {
  29.         Debug.Log ("Before Open");
  30.                 xmppClient.Open();
  31.         Debug.Log ("After Open");
  32.             }
  33.             catch (Exception ex)
  34.             {
  35.                 Debug.Log("During the open");
  36.                 Console.WriteLine(ex.Message);
  37.             }
  38.  
  39.             // Get Online users
  40.             xmppClient.OnPresence += this.xmppClient_OnPresence;
  41.             xmppClient.AutoRoster = false;
  42.         Debug.Log("OK So far");
  43.     }
This post was edited on 2016-07-28, 23:40 by Alex.
Avatar
Alex #4
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
I have no idea then. The problem seems to be in Unity.
Avatar
ryachart #5
Member since Jul 2016 · 1 post
Group memberships: Members
Show profile · Link to this post
This issue occurred for me on Unity 5.3.5f1 when building and deploying to Android using Matrix XMPP.

I was able to fix this issue by setting the API Compatibility Level in the PlayerSettings to ".NET 2.0 Subset" instead of ".NET 2.0".
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: MatriX RSS