rabbitmq / rabbitmq-objc-client

RabbitMQ client for Objective-C and Swift
https://rabbitmq.com
Other
241 stars 84 forks source link

iOS RabbitMQ Xcode 9.x issue #141

Closed abhilesh0801 closed 6 years ago

abhilesh0801 commented 6 years ago

I have two apps, one on Android and other iOS, both use RabbitMQ to give users realtime updates. Android app has no issues, works fine. The iOS app however has stopped receiving updates ever since I upgraded Xcode to version 9. Here is the log that I see in Xcode console

Will start recovery for connection: <RMQConnection: 0x10a07ba70> Received connection: <RMQConnection: 0x10a07ba70> disconnectedWithError: Error Domain=GCDAsyncSocketErrorDomain Code=7 "Socket closed by remote peer" UserInfo={NSLocalizedDescription=Socket closed by remote peer} Starting recovery for connection: <RMQConnection: 0x10a07ba70> [] nw_connection_copy_connected_path 12 Connection has no connected handler [] tcp_connection_is_cellular No connected path Recovered connection: <RMQConnection: 0x10a07ba70> Received connection: <RMQConnection: 0x10a07ba70> disconnectedWithError: Error Domain=NSPOSIXErrorDomain Code=32 "Broken pipe" UserInfo={NSLocalizedDescription=Broken pipe, NSLocalizedFailureReason=Error in write() function}

On the server side I get the following error

PLAIN login refused: user 'username:password' - invalid credentials

While the same credentials work on Android.

One difference that I have noticed is if I print the vhost in both, Android shows the default / whereas iOS just shows it blank.

How do I set the vhost in iOS?

michaelklishin commented 6 years ago

Thank you for your time.

Team RabbitMQ uses GitHub issues for specific actionable items engineers can work on. GitHub issues are not used for questions, investigations, root cause analysis, discussions of potential issues, etc (as defined by this team).

We get at least a dozen of questions through various venues every single day, often light on details. At that rate GitHub issues can very quickly turn into a something impossible to navigate and make sense of even for our team. Because GitHub is a tool our team uses heavily nearly every day, the signal/noise ratio of issues is something we care about a lot.

Please post this to rabbitmq-users.

Thank you.

michaelklishin commented 6 years ago

Virtual host can be configured using RMQConnectionConfig or in a URI.

"Invalid credentials" means that the connection attempt fails to authenticate, not that the user doesn't have the permissions for a certain virtual host. There's a way to verify a pair of credentials without using a client library.