Hi, brand new Blynk user. Have installed local server successfully and talking to Arduino via USB. The problem Im facing is that I create a new account in the app and successfully sign in and can create a new project. But when I stop and restart the local server the app gives me “User is not registered”. The only workaround so far is to create a new account again.
Ive spent many hours searching past posts on this error but Ive not been able to fix it. Help!
two tips, one for your userid and another to eliminate the problem completely :
after you create your account, you should be able to see a new file ‘yourname@email.user’. Verify that file is in your working directory. Your working directory is the directory you told blynk to use when you started the server.
After you see it, stop and start the server, does it just disappear or something? Its a regular text file, so im not sure why it would just be getting deleted. Does the server have rights to the directory? Are your other files/directorys being created there when you start the server?
I eliminate the problem completely by starting the server with my username / password since i am the only one that uses my server. Notice the admin.email / pass below.
oops… did i read this wrong? Your main account works great… but its when you create a brand new account where you’re having issues?.. if so… look back at number 1 and ignore number 2.
Thanks Ivennard. The issue is that the user file does not seem to be created at all when I create the account in the app. Just to be clear, here are the steps I take
Start the server as follows: Deannas-MacBook-Air:Documents deannatzivakis$ java -jar server-0.41.2-java8.jar -dataFolder server_data
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
Blynk Server 0.41.3-SNAPSHOT successfully started.
All server output is stored in folder ‘/Users/deannatzivakis/Documents/logs’ file.
Your Admin url is https://192.168.0.34:9443/admin
Your Admin login email is admin@blynk.cc
Your Admin password is admin
Run Blynk-ser as follows:
Deannas-MacBook-Air:scripts deannatzivakis$ sudo ./blynk-ser.sh
Password:
1 ports found. You can specify port manually using -c option
Select serial port [ /dev/tty.usbserial-DN02YYZ9 ]: /dev/tty.usbserial-DN02YYZ9
Resetting device /dev/tty.usbserial-DN02YYZ9…
Warning: /Users/deannatzivakis/Documents/Arduino/libraries/Blynk/scripts/certs/fullchain.crt not found. Skipping server verification (connection may be insecure)!
[ Press Ctrl+C to exit ]
Connecting: GOPEN:/dev/tty.usbserial-DN02YYZ9,raw,echo=0,clocal=1,cs8,nonblock=1,ixoff=0,ixon=0,ispeed=9600,ospeed=9600,crtscts=0 <-> openssl-connect:192.168.0.34:9443,verify=0,nodelay
2019/02/22 08:45:42 socat[577] N opening character device “/dev/tty.usbserial-DN02YYZ9” for reading and writing
2019/02/22 08:45:42 socat[577] N opening connection to LEN=16 AF=2 192.168.0.34:9443
2019/02/22 08:45:42 socat[577] N successfully connected from local address LEN=16 AF=2 192.168.0.34:49304
2019/02/22 08:45:42 socat[577] N option openssl-verify disabled, no check of certificate
2019/02/22 08:45:42 socat[577] N SSL connection using ECDHE-RSA-AES256-SHA
2019/02/22 08:45:42 socat[577] N SSL connection compression “none”
2019/02/22 08:45:42 socat[577] N SSL connection expansion “none”
2019/02/22 08:45:42 socat[577] N starting data transfer loop with FDs [5,5] and [6,6]
At this point I can see the the RX and TX LEDs on the Arduino board blinking so I assume the local server is talking to the board. I can also see server-data folder has been created.
Go to the app and create the new account. Blynk.log shows:
08:47:21.209 INFO - Trying register user : btzivakis@gmail.com, app : Blynk
08:47:21.218 INFO - Registered btzivakis@gmail.com.
08:47:21.362 INFO - btzivakis@gmail.com Blynk-app (iOS-22500) joined.
08:47:24.369 WARN - Error sending greeting email for btzivakis@gmail.com.
worker.log shows:08:48:01.005 - Error saving : {“name”:“btzivakis@gmail.com”,“email”:“btzivakis@gmail.com”,“appName”:“Blynk”,“region”:“local”,“ip”:“192.168.0.34”,“pass”:“Vkv2njv0dtbJhs2T/xmGq0Y/J9+8kEwDuMFvF5x97Ic=”,“lastModifiedTs”:1550785641218,“lastLoggedIP”:“192.168.0.27”,“lastLoggedAt”:1550785641362,“profile”:{},“isFacebookUser”:false,“isSuperAdmin”:false,“energy”:100000,“id”:“btzivakis@gmail.com-Blynk”}.
08:48:01.005 - Saving user db finished. Modified 0 users.
08:48:54.402 - Ticked widgets for 1 minute : 0. Per second : 0, total time : 2 ms
08:49:01.007 - Starting saving user db.
08:49:01.007 - Saving user db finished. Modified 0 users.
08:49:54.403 - Ticked widgets for 1 minute : 0. Per second : 0, total time : 1 ms
08:50:01.004 - Starting saving user db.
btzivakis@gmail user jason file is not created
I had previously created mail.properties file as follows:mail.smtp.auth=true
mail.smtp.starttls.enable=true mail.smtp.host=smtp.gmail.com
mail.smtp.port=587 mail.smtp.username=btzivakis@gmail.com
mail.smtp.password=MyPassword
mail.smtp.connectiontimeout=30000
mail.smtp.timeout=120000
Also, there is no server.properties file. I read in this forum that this file is optional?
And am I supposed to do something with the Admin@blynk.cc account and Admin password? I haven’t used that for anything so far, as Im not sure what it’s meant for
And one more observation. The server_data folder was created 3 days ago when I first attempted to setup the local server. It has 3 subfolders - ‘backup’, ‘clone’, ‘deleted’ - but all 3 are empty; nothing has ever been written to them
Ivenard, your initial post made me think about checking the access rights for server_data folder. It had read access only.
After changing it to read/write I am now seeing the btzivakis@gmail.com.Blynk.user and admin@blynk.cc.Blynk.user files and can log back in to the app after stopping and restarting the server. So my original issue is solved.
However now Im facing a new issue. When I try to email the auth token I get “Notification error. Try again later” on the App and in the log file:
2-step verification is turned OFF in my gmail ac
count. My mail.properties matches yours (except the order each line appears, which I don’t believe matters?):
Appreciate your help with this. Do you mean to say that I need to put this App password in my mail.properties file instead of my normal gmail password? That’s what I did and still getting same error (even after stopping and starting the server)
Ok thanks for all your help. At least I managed to fix my original issues about the user details not being retained. For now I will have to manually type auth tokens into sketches until I find a fix for the email communication
After many hours of reading similar issues on this forum, I finally figured out where I went wrong. So in case anyone else faces the same issue in the future I’m posting a resolution.
It all came down to my inexperience of how to generate the mail.properties file in Mac OS. I simply edited a new text file and typed in the smtp parameters; DONT do that. Use the command
cat >mail.properties at the Terminal Command line and then type each line separately into Terminal. That fixed my issue and I can now receive the token by email