lurume84 / bling-desktop

Desktop for Blink Home Security Camera
MIT License
89 stars 20 forks source link

Won't login #24

Closed primetractor closed 4 years ago

primetractor commented 4 years ago

Application installed fine on Win10.

Starts up fine, but after entering login credentials (that I have tested on the Blink app), it just sits and spins endlessly. It appears like it's trying to connect (based on the moving progress bar at the bottom), but nothing happens.

lurume84 commented 4 years ago

Ok follow steps below to see which error you get:

  1. Maximize the application by doubleclicking on the window topmost
  2. Right click inside the application and click Show DevTools
  3. Go to the Console tab
  4. Resize/Move the popup so you can interact with login dialog
  5. Login in the application
  6. Check what information gives the console and, in case it does not include confidential data, paste it here
primetractor commented 4 years ago
On Friday, March 27, 2020, 01:32:06 AM MDT, Luis Ruiz <notifications@github.com> wrote:  

Ok follow steps below to see which error you get:

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

lurume84 commented 4 years ago

Your comment is empty, please send It again but inside GitHub.com

primetractor commented 4 years ago

BlingBroke

lurume84 commented 4 years ago

Can you please open with notepad file

%userprofile%\Documents\Bling.exe\Html\viewer\data\token.json

and check contents? Should have

{"account":{"id":<number>,"email_verified":true,"email_verification_required":false},"client":{"id":<number>},"authtoken":{"authtoken":<token>,"message":"auth"},"networks":{"<number>":{"name":"<name>","onboarded":true}},"region":{"prde":"<region>"}}

The problem is you do not have account information and it is strange. Confirm you have something similar but do not publish here any of the information in <>. Then remove this file, reopen application and let's see.

primetractor commented 4 years ago

Thank you.Fortunately there was no information to remove.  {"authtoken":{"authtoken":"","message":"auth"},"networks":{"7231":{"name":"Home","onboarded":true}},"region":{"prod":"United States"}}

That is everything, even after deleting the file and it was re-created.

On Sunday, April 12, 2020, 09:56:29 AM MDT, Luis Ruiz <notifications@github.com> wrote:  

Can you please open with notepad file

%userprofile%\Documents\Bling.exe\Html\viewer\data\token.json

and check contents? Should have

{"account":{"id":,"email_verified":true,"email_verification_required":false},"client":{"id":},"authtoken":{"authtoken":,"message":"auth"},"networks":{"":{"name":"","onboarded":true}},"region":{"prde":""}}

The problem is you do not have account information and it is strange. Confirm you have something similar but do not publish here any of the information in <>. Then remove this file, reopen application and let's see.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

lurume84 commented 4 years ago

Gotcha! The desktop version you have is old, it is not writing the account and token, just the last one. Download the latest one and reinstall.

Blink added the need of account id for downloading videos so I updated the viewer and desktop but there is no automatic desktop download at this time sorry for that.

primetractor commented 4 years ago

Thank you. I uninstalled and download the one from Sep 23, 2019 (1.15) and had the same problem. However, I tried it on a Win7 computer. On that computer a window pops up very quickly then it disappears. When I have the Task Manager open while opening the Bling app, it shows 2 instances briefly then they disappear.

I found the crash reports that even contain a screenshot. Are these sent to you automatically??

DangRock commented 4 years ago

You guys ever get this figured out? I'm having the exact same issue. It just spins, but never logs in. I've installed the latest version of the app available here on GitHub. I tried the previous version also. I'd love to get this working, as it seems to be the best Windows-based solution.

One thing I'll note... I can't find my Bling.ini. I do have a Bling folder under My Documents, but no *.ini files, so I can't verify the settings. Also, no ini files under the install folder: C:\Users\damnr\AppData\Local\Bling Desktop

Thanks!

lurume84 commented 4 years ago

Don't worry we will solve this issue for sure. I will release a new version today, at least you will be able to login and we will see if account id can be accessed from another place.

Bling.ini is created for the first time for storing when last download of videos was done. You can create it manually though.

DangRock commented 4 years ago

Great! I did manually create Blink.ini:

[SyncVideo]
Enabled=true
UseLocalTime=false
Interval=60
Sleep=20
Output=X:\BlinkBling\Videos\
[SyncThumbnail]
Enabled=false
Interval=3600
Sleep=5
Retries=10
Output=X:\BlinkBling\Thumbnails\
[LiveView]
Output=X:\BlinkBling\Videos

It obviously didn't change anything. Looking forward to your next release. I have a pool being built and I am hoping to use this app to setup an hourly snapshot so I can put together a timelapse when the pool is finished. Thanks!

lurume84 commented 4 years ago

What a good idea doing timelapse! I have updated the viewer so it will not fail when account id is not present. Additionally, it will show in a snackbar the data returned by Blink during login. Please copy and paste here BUT remove any reference to your actual information like authtoken and client id. I need to see the structure and not the data itself.

In the mean time this version will allow you to make snapshots as this part does not need account id info. Open the application and wait for automatic update to version 0.1.15. If nothing happens in a couple of minutes close the app, go to %userprofile%/Bling.exe/Download/Versions/Viewer and delete everything. Then go to %userprofile%/Bling.exe/Html and delete viewer folder. Next time you open the app should download last viewer that contains the fix.

On a separate note, I do not recommend setting anything related with interval, sleep and so on in your ini file since setting an incorrect thing could lead into a ban from Blink. These values set the interval of polling to Blink servers and setting something in the wrong units would be interpreted by Blink servers as a DoS attack and they could legitimately block your account. You only need to set the other ones related with thumbnail and videos and that's all. Videos sync will not work until we solve the account id issue and also remember live view does not work in XT2 cameras.

Hope this works for you and please give feedback so we can completely solve this issue ASAP

primetractor commented 4 years ago

I'll give the new one a try. However I'll probably be removing the automatic crash reports. No offense, but the fact that you're taking screenshots of people's desktops without them knowing is a bit sketchy.

lurume84 commented 4 years ago

This is the default behavior of CrahRPT library to see the last action before crashing. It should only screenshot the app not the Desktop itself, I will review it. For this issue application should not crash though.

DangRock commented 4 years ago

So mine is working now... I did get a token error on first log-in, but now it auto-logs in and I'm not seeing any errors. My blink.ini looks like this now:

[SyncVideo]
Enabled=true
UseLocalTime=false
Output=X:\BlinkBling\Videos\
[SyncThumbnail]
Enabled=true
Retries=10
Output=X:\BlinkBling\Thumbnails\
[LiveView]
Output=X:\BlinkBling\Videos\

I'm able to see a snapshot of my Blink XT camera and live view also works. I'm not seeing anything stored in my Thumbnails or Videos folders yet. I think you said Videos wouldn't work, but I was thinking Thumbnails would? As far as setting this up to take a picture every 30 minutes... is that possible? I was thinking that is what the SyncThumbnail interval would do... if I set it to 1800, shouldn't it take a picture and store it in the X:\BlinkBling\Thumbnails\ folder?

Thanks for all your help!

lurume84 commented 4 years ago

Thumbnails Sync will work without accountid, videos sync won't. Wait until the time set and check thumbnails folder as seems correct to me. Also check this folder is accesible and writable. Don't forget to confirm if accountid was present when you login so I can solve the problem.

DangRock commented 4 years ago

Here is what is in my token.json file:

{"authtoken":{"authtoken":"<redacted>","message":"auth"},"networks":{"147304":{"name":"Castillo de Cerezo","onboarded":true}},"region":{"prod":"United States"},"account":{"id":0}}

It's still not copying any pictures to the Thumbnails folder... I did verify I can create files in that folder.

Thanks!

lurume84 commented 4 years ago

I used your same Blink.ini and worked ok. So, let's check some things:

  1. Delete the output folder X:\BlinkBling\Thumbnails
  2. Open the application and confirm this folder and subfolders are recreated. This means your Blink.ini is being loaded by the application and we have write access.
  3. Check in your Blink mobile app if the thumbnail has changed to confirm if the command has been sent to the device. During startup a first snapshot is done for all cameras so you do not have to wait the seconds set.

Confirm this and I will release a new desktop version with traces so we see where is the problem.

DangRock commented 4 years ago

I closed Bling and removed the folders. When I opened it again, it is crashing and probably sending you a dump. I thought maybe it was the folders missing causing it, so I re-added them, but Bling is still crashing on open now.

lurume84 commented 4 years ago

Dumps must be manually sent to me, it does not have an automatic upload system. It is likely to be crashing because there is a process on the background. Go to task manager and kill blingapp.exe. Then open again.

I am currently improving the application so this kind of crashes should not appear anymore. Remove the folders the app will recreate them don't worry

DangRock commented 4 years ago

Oh, yah, you were right... killed that process and it opens now. I did remove the folders and re-open, and it isn't recreating the folders. If I do a manual snapshot on the cameras, I am seeing that snapshot reflected in the Blink app quickly.

My token.json looks like this now:

{"authtoken":{"authtoken":"<redacted>","message":"auth"},"networks":{"147304":{"name":"Castillo de Cerezo","onboarded":true}},"region":{"prod":"United States"},"account":{"id":0}}

Another note... if I remove my Bling.ini, opening the app doesn't recreate it.

lurume84 commented 4 years ago

So, this means Blink.ini is not being loaded. If it was in lowercase, please rename it to blink2.ini and then to Blink.ini.

Seems the problem is just it is not detecting the ini file.

Confirm it is located at:

%userprofile%\Documents\Bling.exe\Blink.ini

DangRock commented 4 years ago

Ahh... there we go. You know what it was? I had created the file as Bling.ini, not Blink.ini. Now it's creating the files. Thanks! I'm gonna let it run for a bit and see how it works. I'll let you know my results.

Thanks!!

DangRock commented 4 years ago

I've had it running for a bit... it's taking snapshots on 2 cameras at 15 minute intervals. That's exactly what I'm looking for it to do. I don't care about storing videos, so I disabled the video sync. So far so good, thanks!

lurume84 commented 4 years ago

Happy to help!

primetractor commented 4 years ago

Okay, so back to the original problem. I tried running the application on the Win7 machine as an administrator, and it did start up, and I could see the saved thumbnails for my cameras. I was also able to look at the battery and wifi health, IP address etc. of each camera.

It wasn't saving the videos or thumbnails though. I noticed I didn't have a blink.ini file, so I shut down the app, created one based on what I've seen here, not sure if it's right though. And restarted the app and it still didn't save videos. When I click on the motion activation icon it's blank.

When I click on the camera or eye icon under the camera, the app hangs, and then it says "could not start crashsender.exe", which means it is obviously trying to send a crash report somewhere and it is automatic. Not sure who though, or if it even works when it's working.

lurume84 commented 4 years ago

CrashSender is used by CrashRpt library to send crashes to HTTP, FTP or SMTP but also for zipping the report folder. I do not have any of these servers to get crashes but I zip the files with it.

Take a look at CrashReportService.cpp line 25:

info.dwFlags |= CR_INST_DONT_SEND_REPORT;
info.dwFlags |= CR_INST_STORE_ZIP_ARCHIVES; 

If any of you want me to check the crashes I need you to manually email me or publish them here (not recommended).

I have moved to another webserver library so many crashes should be gone. There is now a Logs folder inside Documents/Bling.exe that may help diagnose your problem.

Download latest version and check again. (I have also removed the screenshots for crashes ;) )