BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

User is not registered

#1

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!

0 Likes

#2

two tips, one for your userid and another to eliminate the problem completely :

  1. 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?

  1. 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.

Here is my server.properties file

server.host=larry.rocks.com
contact.email=lvennard@rocks.com
  admin.email=lvennard@rocks.com
  admin.pass=larryrules1
allowed.administrator.ips=192.168.1.0/24
http.port=8080
https.port=9443
logs.folder=/var/log/blynk/
enable.db=false
log.level=info
restore.host=blynk-cloud.com
hardware.mqtt.port=8440
listen.address=
product.name=Larry_Blynk
csv.export.data.points.max=43200
allow.store.ip=true
force.port.80.for.csv=false
server.ssl.cert=/etc/keys/larry.crt
server.ssl.key=/etc/keys/larry.key
initial.energy=0
0 Likes

Blynk local server won't send email (setup issue)?
Installation/Deployment of Private Blynk Server on a web host
#3

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.

0 Likes

#4

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

  1. 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

  2. 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.

  1. 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

0 Likes

#5

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

0 Likes

#6

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

0 Likes

#7

change the -datafolder to reflect a real path for me?

/Users/deannatzivakis/server_data

or whatever it is.

also, at a bare minimum , you should have a server.properties file with at least these two lines

server.host=larry.rocks.com
contact.email=lvennard@rocks.com

Before attaching anything to it, we have to make sure the files are working correctly , and then make sure a *.user file is created.

0 Likes

#8

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:

09:54:30.942 ERROR- Error sending email auth token to user : btzivakis@gmail.com. Error: 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 https://support.google.com/mail/?p=BadCredentials b70sm128888pfm.6 - gsmtp.

Ive changed my gmail account to allow less secure app access, but it made no difference

0 Likes

#9

in the case you have double authentication for your email, follow the link they give and setup an APP token password.

Here is my mail.properties that is stored in the data_directory.

mail.smtp.username=larry@rocks.com
mail.smtp.port=587
mail.smtp.password=larryrules1
mail.smtp.auth=true
mail.smtp.starttls.enable=true
mail.smtp.timeout=120000
mail.smtp.host=smtp.gmail.com
mail.smtp.connectiontimeout=30000

0 Likes

#10

Awesome!

0 Likes

#11

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?):

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=
mail.smtp.connectiontimeout=30000
mail.smtp.timeout=120000

I spent a few hours investigating this issue yesterday and have not been able to find a fix

0 Likes

#12

the email side isnt really my thing, so the only tip i have left for that is.

go here
https://myaccount.google.com/security

and create an app account.

thats the password you’ll use.

0 Likes

#13

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)

0 Likes

#14

yep, as long as you tried both passwords. sorry, out of ideas.

1 Like

#15

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

0 Likes

#16

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

1 Like