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

Deploying on Android target #17

Open
mandar1998 opened this issue Dec 2, 2019 · 6 comments
Open

Deploying on Android target #17

mandar1998 opened this issue Dec 2, 2019 · 6 comments

Comments

@mandar1998
Copy link

Hi,
I am working on an AR project in Unity which takes data from the Rabbit AMQP server. On the PC (macOS) I can receive messages perfectly fine. However, as I deploy it on an Android device it throws me the error given below:

RabbitMQ.Client.Exceptions.BrokerUnreachableException: None of the specified endpoints were reachable -->System.TypeLoadException: Could not find method due to a type load error
at RabbitMQ.Client.Framing.Impl.Model..ctor (RabbitMQ.Client.Impl.ISession session) [0x00000] in <17f048ced61b47c38ce84c39b5c3f15d>:0
at RabbitMQ.Client.Framing.Impl.ProtocolBase.CreateModel (RabbitMQ.Client.Impl.ISession session) [0x00000] in <17f048ced61b47c38ce84c39b5c3f15d>:0
at RabbitMQ.Client.Framing.Impl.Connection..ctor (RabbitMQ.Client.IConnectionFactory factory, System.Boolean insist, RabbitMQ.Client.Impl.IFrameHandler frameHandler) [0x000b1] in <17f048ced61b47c38ce84c39b5c3f15d>:0
at RabbitMQ.Client.Framing.Impl.ProtocolBase.CreateConnection (RabbitMQ.Client.IConnectionFactory factory, System.Boolean insist, RabbitMQ.Client.Impl.IFrameHandler frameHandler) [0x00000] in <17f048ced61b47c38ce84c39b5c3f15d>:0
at RabbitMQ.Client.ConnectionFactory.CreateConnection () [0x0002a] in <17f048ced61b47c38ce84c39b5c3f15d>:0
Rethrow as BrokerUnreachableException: None of the specified endpoints were reachable -->System.TypeLoadException: Could not find method due to a type load error

Specifications

  • The Android application was developed using the Unity 3D platform (Version 2019.1.14f1) with Scripting Runtime Version of NET4.x equivalent and API Compatibility Level of .NET Standard 2.0.
  • .NET RabbitMQ client version 3.4.4 (same as included in the package)
  • The Android OS version on the phone is Android 8.1.0.
  • The host PC is running Mac OS.

Any urgent help would be appreciated! Thank you

@ghost
Copy link

ghost commented Oct 8, 2020

I had the same error and for me, changing API Compatibility Level in Player -> Other Settings to .NET 4.x solves the issue.

@moncio
Copy link

moncio commented Jul 27, 2021

Hi, I'm having the same troubles and the problem persists.

I installed RabbitMQ by docker typing the next comand:
docker run -it --rm --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management

Then, running the scene "AmqpDemo", when I run inside the Unity player clicking the "connect" button it's ok but when I run for Android target, the terminal shows me the next issue:

2021-07-27 14:53:40.560 8867-10080/com.DefaultCompany.OpenPoseRig I/Unity: RabbitMQ.Client.Exceptions.BrokerUnreachableException: None of the specified endpoints were reachable ---> RabbitMQ.Client.Exceptions.ConnectFailureException: Connection failed ---> System.Net.Sockets.SocketException: mono-io-layer-error (111)
at System.Net.Sockets.SocketAsyncResult.CheckIfThrowDelayedException () [0x00000] in <00000000000000000000000000000000>:0
at System.Net.Sockets.TcpClient.EndConnect (System.IAsyncResult asyncResult) [0x00000] in <00000000000000000000000000000000>:0
at RabbitMQ.Client.Impl.SocketFrameHandler.Connect (System.Net.Sockets.TcpClient socket, RabbitMQ.Client.AmqpTcpEndpoint endpoint, System.Int32 timeout) [0x00000] in <00000000000000000000000000000000>:0
at RabbitMQ.Client.Impl.SocketFrameHandler..ctor (RabbitMQ.Client.AmqpTcpEndpoint endpoint, RabbitMQ.Client.ConnectionFactoryBase+ObtainSocket socketFactory, System.Int32 timeout) [0x00000] in <00000000000000000000000000000000>:0
at RabbitMQ.Client.Framing.Impl.ProtocolBase.CreateFrameHandler (RabbitMQ.Client.Am

These are some of my current players settings for Android deployment:

image

Anyone can help me? @meverett

Thank you!

_

@mandar1998
Copy link
Author

System.Net.Sockets.SocketException: mono-io-layer-error (111) This line says that it's some HTTP connection issue. Maybe check if you are calling the correct URL path, if you are calling at all.

@moncio
Copy link

moncio commented Jul 28, 2021

Thank you for your reply @mandar1998 , but the current error shows me is the following: None of the specified endpoints were reachable ---> System.PlatformNotSupportedException: Operation is not supported on this platform.

@moncio
Copy link

moncio commented Jul 28, 2021

@mandar1998 @meverett @CymaticLabs look at this, when I run with API level .NET 4.x and scripting backend Mono, everything is ok but when I change the scripting backend to IL2CPP, I have the next problem:

image

My question is, no posibility to run the demo for the last scripting backend?
Thanks!

@moncio
Copy link

moncio commented Jul 28, 2021

Well, after several tests, looking for different solutions, I realised in this issue is the key: #13 (comment)

Downloading those dll and replacing in the proper folder, everyting is working for both architectures. Anyway,thanks to all of you for the help.

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

No branches or pull requests

3 participants
@moncio @mandar1998 and others