ezhes / OSXMessageProxy

An API for OSX's Messages app which provides full iMessage capabilities!
MIT License
84 stars 13 forks source link

No JSON Data #14

Closed jsicherm closed 7 years ago

jsicherm commented 7 years ago

When double clicking the StartIMProxy.command, the server starts up as expected and I can connect to it in AndromedaB, but no JSON is displayed in the server console and AndromedaB complains that no JSON data is available.

I'm using a 2011 Mac Air on Sierra and Galaxy S7 running the latest Android OS with the latest OSXMessageProxy and AndromedaB installations.

ezhes commented 7 years ago

Do you get nothing at all in the logs? When you say the app connects do you mean you see the banner pop up that says connected or whatever? It could be that your message database can't be read for whatever reason

jsicherm commented 7 years ago

When I click the startup script, I get this in the console and nothing else.

jordan:~ Jordan$ /Users/Jordan/Desktop/MessageProxy/StartIMProxy.command ; exit;

But the MessageProxy app (with the pink heart icon) pops up and says "Server Status: ready at ..."

[EDIT] Additionally, when I close the MessageProxy app, the console displays a NoSuchFileException at /Users/Jordan/Library/Logs/DiagnosticReports/MessageProxy*

[EDIT 2] After waiting awhile, this error has popped up: MessageProxy[3779:181702] [Accounts] Failed to update account with identifier <my identifier>, error: Error Domain=ABAddressBookErrorDomain Code=1002 "(null)"

The AndromedaB app shows a banner saying connected but shows no data and then shows an alert saying the JSON data could not be found. I just don't know why it isn't loading it on my Mac.

jsicherm commented 7 years ago

To summarize, after playing around with it for quite awhile:

  1. I run the StartIMProxy.command by double clicking.
  2. It makes a log folder, logs "Starting Server at ____" and displays nothing in the terminal.
  3. OSXMessageProxy opens and says "Ready at _____".
  4. I connect to the server from my Android and a banner shows up that says Connected.
  5. A few seconds later, a banner appears on my Android that says "Unable to load conversationJSONDatab..s" (can't see the full banner on my phone).

If I browse to my.domain:8735/conversations?t=password, I can see a bunch of message JSON data so it's being loaded... Perhaps it's crashing because my contacts have emojis in their name?

jsicherm commented 7 years ago

This is actually an issue with AndromedaB. It is simply timing out before it receives the list of conversations (I have a lot. Like, 194000). Fixed by the addition of stringRequester.setRetryPolicy(new DefaultRetryPolicy(500000, DefaultRetryPolicy.DEFAULT_MAX_RETRIES, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT)); to line 45 of RemoteMessagesInterface#getConversations()

ezhes commented 7 years ago

Yeah I'm going to say "wont-fix" to that issue haha. Guess I'm not popular enough to need that? I'd look at getting rid of some conversations because the conversation list is sent on every new message as needed which would mean a ton of useless data is sent if you have 194k conversations (especially with the crappy socket implementation which dies if you transmit too fast, looking to replace it soon) I should limit it though to maybe only returning the 50 most recent conversations.

Does the app actually perform well? For me with <50 conversations it's faster on my local network than using the Messages app on my iPhone 6 but with so many conversations I'm wondering what breaks first.

jsicherm commented 7 years ago

Ahaha yeah good plan. I've been working on some mods in an offline copy of Andromeda... I've got a compose message setup (had to add a /contacts command to the server to simplify) running and I weeded off any big conversations.

Something else I've come across is that the JSON (and therefore andromeda) will distinguish between one contact with two contact options (ie. email and phone) where iMessage will condense them into one conversation. This causes an issue to arise in some compositions.

I'll probably fork your repo and submit some PRs when I have reliable and tidy changes. Great project!

Sent from my iPhone

On Jun 21, 2017, at 4:27 PM, Salman Husain notifications@github.com wrote:

Yeah I'm going to say "wont-fix" to that issue haha. Guess I'm not popular enough to need that? I'd look at getting rid of some conversations because the conversation list is sent on every new message as needed which would mean a ton of useless data is sent if you have 194k conversations. I should limit it though to maybe only returning the 50 most recent conversations.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.