joaomgcd / JoinDesktop

A desktop app for Join built in Electron

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SMS Contact Undefined

jw1800 opened this issue · comments

I am using Windows 10 with Galaxy S20 Ultra with version 1.0.

Any attempt to send a text message through the desktop app or join web seems to fail regardless of browser. In both cases it seems contact is 'undefined' in the sending request.

Sending SMS! RequestSendSMS {contact: undefined, text: 'whatever text' attachment: null, subject: '', urgent: false

Hi. Can you please try it in the latest version of the app? thanks in advance!

I upgraded to 1.0.1 and unfortunately I am still getting the same thing on both the app and web version.

I will be gone for the next week or so, so apologies in advance if you reply and i do not respond quickly.

I see this as well, even in 1.0.2. Pixel 4, using Andsroid 12 beta 2.1. I don't recall having this issue during the Join desktop application beta. I still have the Chrome extension installed on the same machine, and it works without issue.

I can see the history of the SMS messages from all contacts, and it's up to date. I see the image of the contact correctly. Hmm. Not sure what else I can add.

Thanks for the updates. @jice73 If you bring up the console (right-click) do you see the same message as @jw1800 ?

(Short answer, yes)

Here's what is in my console. I just copied everything. Sorry if it's too much. I am more a C++ guy than web front end. :)

Some random details that may matter: home network is Google WiFi (single NAT), I run an ad blocker on my phone (Blokada)

appdashboard.js:553 Loaded user Object
device.js:900 Testing local network for Pixel 4 on http://192.168.86.35:38043/...
192.168.86.35:38043/gcm?token=ya29.a0AfH6SMCl1P4wyi46CIdq5hQMsCycVRa-rcnJdjjjqVD2XoreogZlhDNA8TI2veF4aKjJpXnivDPEjPIlJgLJpF5L-bzbJ4nkIM2YQ4D876YXkbSz4t-hJ_TWQAgTjqoRgSdDT4JqFUc6Od2iWpc4BaPEc9xX5os:1 Failed to load resource: net::ERR_CONNECTION_REFUSED
device.js:967 Error conneting to local network device DeviceAndroidPhone TypeError: Failed to fetch
testIfLocalNetworkIsAvailable @ device.js:967
device.js:702 Pixel 4: remote
device.js:900 Testing local network for Pixel 4 on http://192.168.86.35:40353/...
device.js:702 Pixel 4: local
device.js:936 Allows unsecure connection. Trying websocket!
device.js:939 Socket connected!!! Pixel 4 WebSocket
device.js:702 Pixel 4: local
device.js:69 Last Known Checks Results. Array(1)
device.js:73 All local network tests are a success!!
appdashboard.js:408 ObjectalternateLink: "https://drive.google.com/file/d/1p4_4HC-qxl5iASC68LzgracMa2QVNvSF/view?usp=drivesdk"appDataContents: falsecapabilities: {canCopy: true, canEdit: true}copyRequiresWriterPermission: falsecopyable: truecreatedDate: "2021-01-15T12:28:05.519Z"downloadUrl: "https://www.googleapis.com/drive/v2/files/1p4_4HC-qxl5iASC68LzgracMa2QVNvSF?alt=media&source=downloadUrl"editable: trueembedLink: "https://drive.google.com/file/d/1p4_4HC-qxl5iASC68LzgracMa2QVNvSF/preview?usp=drivesdk"etag: ""MTYyNDYxOTQ1MTEwNg""explicitlyTrashed: falsefileExtension: ""fileSize: "92"headRevisionId: "0B8Tf9x2wDAmRWG82T0ZWb2UweTFPblhQYmROdGY2TWtJRUdNPQ"iconLink: "https://drive-thirdparty.googleusercontent.com/16/type/application/json"id: "1p4_4HC-qxl5iASC68LzgracMa2QVNvSF"kind: "drive#file"labels: {starred: false, hidden: false, trashed: false, restricted: false, viewed: true}lastModifyingUser: {kind: "drive#user", displayName: "Chris Ling", picture: {…}, isAuthenticatedUser: true, permissionId: "09652701802906440422", …}lastModifyingUserName: "Chris Ling"lastViewedByMeDate: "2021-06-25T11:10:51.106Z"markedViewedByMeDate: "1970-01-01T00:00:00.000Z"md5Checksum: "8a3a735e94bcc219cd1f043e54615209"mimeType: "application/json"modifiedByMeDate: "2021-06-25T11:10:51.106Z"modifiedDate: "2021-06-25T11:10:51.106Z"originalFilename: "serveraddresses=:=9ba70f859d3443eaa25e797615672f24"ownerNames: ["Chris Ling"]owners: [{…}]parents: [{…}]quotaBytesUsed: "92"selfLink: "https://www.googleapis.com/drive/v2/files/1p4_4HC-qxl5iASC68LzgracMa2QVNvSF"shared: falsespaces: ["drive"]title: "serveraddresses=:=9ba70f859d3443eaa25e797615672f24"userPermission: {kind: "drive#permission", etag: ""XclXokqZvfYdypzqNm3A5JclN6E"", id: "me", selfLink: "https://www.googleapis.com/drive/v2/files/1p4_4HC-qxl5iASC68LzgracMa2QVNvSF/permissions/me", role: "owner", …}version: "5"webContentLink: "https://drive.google.com/uc?id=1p4_4HC-qxl5iASC68LzgracMa2QVNvSF&export=download"writersCanShare: true__proto__: Object
apphelpersms.js:49 Handling SMS for Pixel 4
apphelpersms.js:283 Sending SMS! RequestSendSMSattachment: undefinedcontact: undefinedsubject: ""text: "test"urgent: false__proto__: Object
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/jice7/AppData/Local/com/app-1.0.2/resources/app.asar/v2/dexie.js.map:

Thanks! One other question: is that phone where you're sending the SMS from on the same local network as your PC? (does it have the local network icon in the devices tab?) Thanks!

Yes, it does.

image

Are you by any chance familiar with the chrome javascript debugger? 😅 That would be very handy in this situation. I can't reproduce the issue at all..

Sorry, not at all. :( More a Visual Studio or GDB guy when debugging.

If you could please give it a small try I would very much appreciate it... 😅 If you

  • right click the app to bring up the console, then go to the Sources tab (at the top)
  • on the left expand v2 > sms > conversation and then open the controlsmsconversation.js file
  • on the right, click line number 68 (right on the number 68) to add a break point
  • click one of the SMS conversations
  • on the console at the bottom write smsConversation in the command line and see what it outputs

Sorry to ask this but there's no easy way for me to send code for you to try!

Sure, will do. I'll edit this after I do the above.

Maybe it's best if you reply in a new message because otherwise I won't be notified. Thank you very much!!

This is from the watch window:

smsConversation: SMSConversation(4)
0: SMSMessage {date: 1575384152520, isMMS: false, received: true, text: "Chris, exciting news! Your contact lenses are read…6) 450-8636. Please do not reply to this message.", id: "11218", …}
1: SMSMessage {date: 1578667443102, isMMS: false, received: true, text: "Chris, exciting news! Your contact lenses are read…6) 450-8636. Please do not reply to this message.", id: "13562", …}
2: SMSMessage {date: 1600092178395, isMMS: false, received: true, text: "Chris, exciting news! Your contact lenses are read… update your options, click https://4is.ca/dNGclc", id: "30079", …}
3: SMSMessage {date: 1623340125223, isMMS: false, received: true, text: "Spectrum Eyecare & Eyewear - Chris, exciting news!…ge your preferences, visit https://4is.ca/_TzWK1.", id: "43038", …}
address: (...)
length: 4
proto: Array

This is from the console:
SMSConversation(4) [SMSMessage, SMSMessage, SMSMessage, SMSMessage]
0: SMSMessage {date: 1575384152520, isMMS: false, received: true, text: "Chris, exciting news! Your contact lenses are read…6) 450-8636. Please do not reply to this message.", id: "11218", …}
1: SMSMessage {date: 1578667443102, isMMS: false, received: true, text: "Chris, exciting news! Your contact lenses are read…6) 450-8636. Please do not reply to this message.", id: "13562", …}
2: SMSMessage {date: 1600092178395, isMMS: false, received: true, text: "Chris, exciting news! Your contact lenses are read… update your options, click https://4is.ca/dNGclc", id: "30079", …}
3: SMSMessage
contact: Contact {name: "83937", number: "83937"}
date: 1623340125223
id: "43038"
isMMS: false
received: true
text: "Spectrum Eyecare & Eyewear - Chris, exciting news! Your contact lenses are ready for pickup. In light of Covid-19 we are now asking that all patients make an appointment to pick-up their orders. This method will minimize the traffic inside the office. Please call us at (506) 450-8636↵To change your preferences, visit https://4is.ca/_TzWK1."
isLoading: (...)
proto: Object
address: (...)
length: 4
proto: Array
addSmsMessage: ƒ addSmsMessage(smsMessage)
address: (...)
constructor: class SMSConversation
get address: ƒ address()
proto: Array(0)

I can expand any variables as needed.

Ok, that's very helpful!
Are you able to keep going helping me out? 😅 If so:

  • On the right of the developer console, check the Call Stack part and (while the execution is paused on that debug point) click on the line that says switchToConversation
  • Check what's inside the args variable like you did above
  • Check what's in the this.contact variable too
    Thank you! Wish all users could do this!

Yep, no problem - happy to keep going. :)

It's very sinmilar to debugging in Visual Studio really. I wasn't srue how far to expand what fields.

From the watch window:

args: Object
address: "83937"
contact: Contact {name: "83937", number: "83937"}
db: Dexie {_middlewares: {…}, verno: 8, _options: {…}, _deps: {…}, _dbSchema: {…}, …}
deviceId: "e08aba4e8b584b34a659ec3b0704ae25"
token: "ya29.a0AfH6SMAZr9rS5cDzuz49nzb-2fKKZm04XK1-t8f4qBj0HkotZ52W4Td48zsPhMj4JdPBDv1ITV5Y70UeQESMcXlZqEFArlPPtA40-EMi2SeS2PZEaNpSXiNOdUqxuJYOJHRgz5vOMlU-JQ5_ccKxGxH2fzGDbs4"
__proto__: Object

this.contact: Contact
name: "83937"
number: "83937"
address: (...)
__proto__: Object

You're great, thanks! 😄

Ok, another one:

  • on the left expand v2 > sms > conversation and then open the smsconversation.js file
  • Set a breakpoint on line 22
  • Keep executing until deviceId and contact don't have a value
  • Check where the execution comes from in the call stack

Thanks again! 👍

OK, I disabled the breakpoint in controlsmsconversation.js, and added the new one. I then loaded back up the conversation and hit the new breakpoint twice (I resumed each time with F8, I assume that's correct), with values in the contact and deviceId variables both times. After that, I could type a message, so I attempted to send one. The breakpoint did not get hit again.

HHmm, weird. Just to clarify, you got the same error after trying to send, right?

Yes, same error.

Wait, do you have encryption enabled?

I do.

Aha, I know what's wrong then 😊 Thank you! Will fix and report back!

Maybe an additional clue. I am now having issues reproducing the original error after ~10 tries of going back to the contact list, and going back to that contact to send a message. No message is sent, but no error either.

Oh, OK. Hopefully that's it. :)

Ok, can you please check if this version works? https://drive.google.com/file/d/1wWAi8fxnMsFObo6HZUuvDsteeth1c9qh/view?usp=sharing

Thanks again for your help!!

Sure, grabbing it now.

Thanks :)

After hitting enter, the wait cursor spins for a bit, then I get "Couldn't send SMS. Timed out". But it sends. :)

Great, progress! :) Can you please check the developer logs after you send the SMS now?

Here you go:

Loading SMS conversation SMSConversation(4) [SMSMessage, SMSMessage, SMSMessage, SMSMessage, contact: Contact, number: "83937", deviceId: "e08aba4e8b584b34a659ec3b0704ae25"]
/C:/Users/jice7/AppData/Local/com/app-1.0.2/resources/app.asar/undefined:1 GET file:///C:/Users/jice7/AppData/Local/com/app-1.0.2/resources/app.asar/undefined net::ERR_FILE_NOT_FOUND
Image (async)
renderSpecific @ controlsmsconveration.js:215
async function (async)
renderSpecific @ controlsmsconveration.js:189
render @ control.js:168
async function (async)
render @ control.js:166
renderCurrentSmsConversation @ controlsmsconveration.js:110
setSmsConversation @ controlsmsconveration.js:89
switchToConversation @ apphelpersms.js:153
async function (async)
switchToConversation @ apphelpersms.js:131
setMode @ apphelpersms.js:82
onRequestOpenSmsConversation @ apphelpersms.js:209
sendToRegistered @ eventbus.js:84
post @ eventbus.js:94
post @ eventbus.js:15
smsThreadRender.onclick @ controlsmsthread.js:45
/C:/Users/jice7/AppData/Local/com/app-1.0.2/resources/app.asar/undefined:1 GET file:///C:/Users/jice7/AppData/Local/com/app-1.0.2/resources/app.asar/undefined net::ERR_FILE_NOT_FOUND
Image (async)
renderSpecific @ controlsmsconveration.js:215
async function (async)
renderSpecific @ controlsmsconveration.js:189
render @ control.js:168
async function (async)
render @ control.js:166
renderCurrentSmsConversation @ controlsmsconveration.js:110
setSmsConversation @ controlsmsconveration.js:89
reloadConversationFromNetwork @ apphelpersms.js:160
async function (async)
reloadConversationFromNetwork @ apphelpersms.js:159
switchToConversation @ apphelpersms.js:155
async function (async)
switchToConversation @ apphelpersms.js:131
setMode @ apphelpersms.js:82
onRequestOpenSmsConversation @ apphelpersms.js:209
sendToRegistered @ eventbus.js:84
post @ eventbus.js:94
post @ eventbus.js:15
smsThreadRender.onclick @ controlsmsthread.js:45
apphelpersms.js:285 Sending SMS! RequestSendSMS {contact: Contact, text: "test", attachment: null, subject: "", urgent: false}
/C:/Users/jice7/AppData/Local/com/app-1.0.2/resources/app.asar/undefined:1 GET file:///C:/Users/jice7/AppData/Local/com/app-1.0.2/resources/app.asar/undefined net::ERR_FILE_NOT_FOUND
Image (async)
renderSpecific @ controlsmsconveration.js:215
async function (async)
renderSpecific @ controlsmsconveration.js:189
render @ control.js:168
async function (async)
render @ control.js:166
renderCurrentSmsConversation @ controlsmsconveration.js:110
setSmsConversation @ controlsmsconveration.js:89
addSmsMessage @ controlsmsconveration.js:93
onRequestSendSMS @ apphelpersms.js:297
async function (async)
onRequestSendSMS @ apphelpersms.js:286
sendToRegistered @ eventbus.js:84
post @ eventbus.js:94
post @ eventbus.js:15
sendSms @ controlsmsconveration.js:158
async function (async)
sendSms @ controlsmsconveration.js:157
inputElementKeyDown @ controlsmsconveration.js:168
apphelpersms.js:301 SMS Send result GCMSmsSentResult {type: "GCMSmsSentResult", success: false, errorMessage: "Timed out"}
/C:/Users/jice7/AppData/Local/com/app-1.0.2/resources/app.asar/undefined:1 GET file:///C:/Users/jice7/AppData/Local/com/app-1.0.2/resources/app.asar/undefined net::ERR_FILE_NOT_FOUND

In casse this is more readable:

image

Just realized you said developer logs. I had read console for some reason. Looking for that.

Sorry, I meant console logs 😅 Let me take a look

Hhmm, that means that Join on your phone can't get the indication from the system that the SMS was indeed sent. You don't happen to know why that is, do you?

Nope, I do not. But I have seen that before, with the Chrome extension on this and other machines I use Join on.

Not often, just occasionally. I did sent ~7 messages and every one said it timed out to test this.

Yeah, the issue is with your phone. Sorry, I don't think I can work around that one. It will do the same when trying to send from anywhere. I think you'll have to assume that the message was sent when it times out... 😅

Fair enough. Thank you very much for solving this! :)

No problem! 😊 Again, thanks for your help! As I said above, wish all users were this helpful!