Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to create a new user - 'username is already taken' #538

Closed
webmst opened this issue Feb 24, 2016 · 29 comments
Closed

Unable to create a new user - 'username is already taken' #538

webmst opened this issue Feb 24, 2016 · 29 comments

Comments

@webmst
Copy link

webmst commented Feb 24, 2016

Hi Vitaly,
after having installed the latest traccar-web release on traccar 3.3 and having created all the mysql tables from scratch, I'm unable to add another user beside 'admin'.

No matter what I type as username, I always get an 'username is already taken' message.
I can confirm that the 'users' table just contains the 'admin' row.

@vitalidze
Copy link
Owner

Unfortunately there are still issues with 3.3 integration. I haven't come to an universal solution yet.

Please read discussions here #510 #519 #520 #521 #524

@webmst
Copy link
Author

webmst commented Feb 25, 2016

I tried deleting the users and positions tables on MySQL and disabling the database.changelog option in traccar.xml (as it was suggested in the issues you mentioned) but nothing changed, I'm unable to create the new user.

Still, I see a slight difference of behavior during the creation of the user using different browsers:

  • with Chrome, when I press add I get a form suggesting an editing (username/password are displayed, but not other fields) of the admin user
  • with IE, when I press 'add' I get (correctly) a blank form , but then a username is already taken message is displayed

For the record, at the moment I see no other problem on 3.3.

@vitalidze
Copy link
Owner

Please show contents of wrapper.log file.

@webmst
Copy link
Author

webmst commented Feb 25, 2016

I have no wrapper.log file (i.e. I'm not using the java wrapper), we discovered this together when you connected to my server via ssh; I'm using FreeBSD.

@vitalidze
Copy link
Owner

Still you should have some log file somewhere, which contains output of that java application. It is needed to investigate this issue.

@webmst
Copy link
Author

webmst commented Feb 25, 2016

Using the given () FreeBSD script, stdout and stderr are suppressed, infact in our session we manually started the traccar application to debug. This is the output:

root@freenas:/usr/local/traccar # java -cp tracker-server.jar org.traccar.Main conf/traccar.xml
[MLog-Init-Reporter] INFO com.mchange.v2.log.MLog - MLog clients using slf4j logging.
[main] INFO com.mchange.v2.c3p0.C3P0Registry - Initializing c3p0-0.9.5.2 [built 08-December-2015 22:06:04 -0800; debug? true; trace: 10]
[main] INFO org.eclipse.jetty.util.log - Logging initialized @17418ms
[main] INFO com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource - Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, contextClassLoaderSource -> caller, dataSourceName -> 1hge1249f6jn30xee4gve|1b6d4ae, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> com.mysql.jdbc.Driver, extensions -> {}, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, forceSynchronousCheckins -> false, forceUseNamedDriverClass -> false, identityToken -> 1hge1249f6jn30xee4gve|1b6d4ae, idleConnectionTestPeriod -> 600, initialPoolSize -> 3, jdbcUrl -> jdbc:mysql://127.0.0.1:3306/traccar?allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=ANSI_QUOTES, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 15, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 3, numHelperThreads -> 3, preferredTestQuery -> null, privilegeSpawnedThreads -> false, properties -> {user=_, password=_}, propertyCycle -> 0, statementCacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> true, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, userOverrides -> {}, usesTraditionalReflectiveProxies -> false ]
[main] INFO org.eclipse.jetty.server.Server - jetty-9.2.14.v20151106
[main] INFO org.eclipse.jetty.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler@172a855{/api,null,AVAILABLE}
[main] INFO org.eclipse.jetty.webapp.StandardDescriptorProcessor - NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
[main] INFO org.eclipse.jetty.server.handler.ContextHandler - Started o.e.j.w.WebAppContext@125a5b8{/,file:/tmp/jetty-0.0.0.0-8082-traccar-web.war-_-any-5054127297947397737.dir/webapp/,AVAILABLE}{/usr/local/traccar/traccar-web.war}
[main] WARN org.eclipse.jetty.server.handler.AbstractHandler - No Server set for org.traccar.web.WebServer$1@58eca5
[main] INFO org.eclipse.jetty.server.ServerConnector - Started ServerConnector@1f540d{HTTP/1.1}{0.0.0.0:8082}
[main] INFO org.eclipse.jetty.server.Server - Started @268868ms
Feb 25, 2016 9:46:11 AM org.traccar.web.server.model.MethodCallLogger invoke
INFO: Login 'admin'
Feb 25, 2016 9:46:52 AM org.traccar.web.server.model.MethodCallLogger invoke
INFO: Login 'admin'

@webmst
Copy link
Author

webmst commented Feb 25, 2016

BTW, doing it manually I've noticed that the startup has slown down considerably...

@vitalidze
Copy link
Owner

There is no error in this log. Try to reproduce issue with inability to add user and then put an output here.

Regarding the issue with startup how much time does it usually take to startup?

@webmst
Copy link
Author

webmst commented Feb 25, 2016

Yes, I know there is no error and I also checked the output when performing the new user creation (with both browsers), but no lines are produced; the log is of no help.

Regarding startup time, I don't know how much time it usually takes; when the application is run normally, it is executed in the background (as a service) giving me no awareness.

But now, making a comparison with the manual start we performed on Nov 2015, I realize it's taking a LOT more: to speak with numbers it now takes 4'53'' to start serving web pages on my server (a Duron 1Ghz / 1Gb RAM on FreeBSD 10.1), before it was around 3'.

Anyway, I deem this normal.

@vitalidze
Copy link
Owner

Yes, I know there is no error and I also checked the output when performing the new user creation (with both browsers), but no lines are produced; the log is of no help.

Then the only way to diagnose the issue is to look into web browser console. I have no other ideas. Also it's worth to check the database table structure of table users and positions.

Regarding startup time, I don't know how much time it usually takes; when the application is run normally, it is executed in the background (as a service) giving me no awareness.

But now, making a comparison with the manual start we performed on Nov 2015, I realize it's taking a LOT more: to speak with numbers it now takes 4'53'' to start serving web pages on my server (a Duron 1Ghz / 1Gb RAM on FreeBSD 10.1), before it was around 3'.

The startup time depends on the number of positions you have in your database. System performs some schem validation steps during startup, so it may take this long.

@webmst
Copy link
Author

webmst commented Feb 25, 2016

Then the only way to diagnose the issue is to look into web browser console. I have no other ideas. Also it's worth to check the database table structure of table users and positions.

Those tables have just been deleted (created by the original 'traccar' engine) and re-created under traccar-web.

Well, as soon as I opened Chrome's console (with traccar-web already on screen) this is what I found:

(warning)  traccar-0.js:5713  Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.

(error)  traccar-0.js:6105  GET http://192.168.0.220:8082/api/ Failed to load resource: the server responded with a status of 400 (Bad Request)

But no other warnings are displayed pressing the add button to create a new user (but - as I said before - instead of a blank form, an editing of the admin user is displayed with Chrome)

@webmst
Copy link
Author

webmst commented Feb 25, 2016

The startup depends on the number of positions you have in your database. System performs some schem validation steps during startup, so it may take this long.

As I had already told at the beginning of this issue, the entire traccar database had just been re-created for the 3.3 upgrade, so I don't think it is due to lots of records to be analyzed; maybe it is just for a different load on my system.

@webmst
Copy link
Author

webmst commented Feb 25, 2016

Anyway, this is the current structure of the above said tables:

positions

+------------+---------------+------+-----+---------+----------------+
| Field      | Type          | Null | Key | Default | Extra          |
+------------+---------------+------+-----+---------+----------------+
| id         | bigint(20)    | NO   | PRI | NULL    | auto_increment |
| address    | varchar(255)  | YES  |     | NULL    |                |
| altitude   | double        | YES  |     | NULL    |                |
| course     | double        | YES  |     | NULL    |                |
| latitude   | double        | YES  |     | NULL    |                |
| longitude  | double        | YES  |     | NULL    |                |
| other      | varchar(2048) | YES  |     | NULL    |                |
| power      | double        | YES  |     | NULL    |                |
| protocol   | varchar(255)  | YES  |     | NULL    |                |
| serverTime | datetime      | YES  |     | NULL    |                |
| speed      | double        | YES  |     | NULL    |                |
| time       | datetime      | YES  |     | NULL    |                |
| valid      | bit(1)        | YES  |     | NULL    |                |
| device_id  | bigint(20)    | YES  | MUL | NULL    |                |
+------------+---------------+------+-----+---------+----------------+

users

+----------------------+--------------+------+-----+---------+----------------+
| Field                | Type         | Null | Key | Default | Extra          |
+----------------------+--------------+------+-----+---------+----------------+
| id                   | int(11)      | NO   | PRI | NULL    | auto_increment |
| name                 | varchar(128) | NO   |     | NULL    |                |
| email                | varchar(128) | NO   | UNI | NULL    |                |
| hashedPassword       | varchar(128) | NO   |     | NULL    |                |
| salt                 | varchar(128) | NO   |     | NULL    |                |
| readonly             | bit(1)       | NO   |     | b'0'    |                |
| admin                | bit(1)       | NO   |     | b'0'    |                |
| map                  | varchar(128) | YES  |     | NULL    |                |
| language             | varchar(128) | YES  |     | NULL    |                |
| distanceUnit         | varchar(128) | YES  |     | NULL    |                |
| speedUnit            | varchar(128) | YES  |     | NULL    |                |
| latitude             | double       | NO   |     | 0       |                |
| longitude            | double       | NO   |     | 0       |                |
| zoom                 | int(11)      | NO   |     | 0       |                |
| archive              | bit(1)       | YES  |     | NULL    |                |
| blocked              | bit(1)       | YES  |     | NULL    |                |
| companyName          | varchar(255) | YES  |     | NULL    |                |
| expirationDate       | date         | YES  |     | NULL    |                |
| firstName            | varchar(255) | YES  |     | NULL    |                |
| lastName             | varchar(255) | YES  |     | NULL    |                |
| login                | varchar(255) | YES  | UNI | NULL    |                |
| manager              | bit(1)       | YES  |     | NULL    |                |
| maxNumOfDevices      | int(11)      | YES  |     | NULL    |                |
| notifications        | bit(1)       | YES  |     | NULL    |                |
| password             | varchar(255) | YES  |     | NULL    |                |
| password_hash_method | int(11)      | YES  |     | NULL    |                |
| phoneNumber          | varchar(255) | YES  |     | NULL    |                |
| managedBy_id         | bigint(20)   | YES  |     | NULL    |                |
| userSettings_id      | bigint(20)   | YES  | MUL | NULL    |                |
+----------------------+--------------+------+-----+---------+----------------+

BTW: This issue you marked duplicate doesn't seem similar to a previous one.

@vitalidze
Copy link
Owner

Your database structure looks incorrect. In particular email column should not have the UNIQUE flag. Also all VARCHAR columns that are now of 128 length must be of 255 length. Maybe there are other differences, but these are what caught by my eyes.

Looks like you did all steps in a wrong order. Basically, it should be this way:

  1. Stop traccar service
  2. Disable database.changelog option in traccar.xml (comment out or remove)
  3. Drop tables positions and users
  4. Start traccar service.

If tables still look like in previous comment then you did something wrong.

BTW: This issue you marked duplicate doesn't seem similar to a previous one.

The symptoms are ABSOLUTELY same. So this issue is definitely a duplicate.

P.S. Why are you always trying to start a dispute? What's the point?

@webmst
Copy link
Author

webmst commented Feb 25, 2016

P.S. Why are you always trying to start a dispute? What's the point?

I am not... please don't think this way! I would like you to be sure I am a friend of yours, pratically supporting you and your great project :-) . What I've written here, has the only purpose of describing what's happening on my side without criticizing, for the sake of solving this issue and nothing else, in the same time serving the traccar-web community; it is just "team-working" and it is necessary to thorough debug and test such a remarkable but complex application you've developed, that could not be improved without the help of many people, each one serving you with their unique end-user-experience.

Looks like you did all steps in a wrong order. Basically, it should be this way:

1) Stop traccar service
2) Disable database.changelog option in traccar.xml (comment out or remove)
3) Drop tables positions and users
4) Start traccar service.

As I previously said, I had already dropped the positions and users table and disabled the database.changelog as you suggested, with no change. I understand now that the users table structure is different from what you may expect, but I swear I haven't modified it!
As you suggested, I will delete the given tables again, still I am not the developer so I cannot know why certain things happen but just report them (BTW, I have found only this minor problem on user management with this critical 3.3 upgrade; I recreated the positions table but it doesn't matter here)

Speaking about the labeling of this issue, I had read all the issues you referenced before and - besides common database issues - I had noticed that none reported the strange behaviour happening with the two browsers (for which you gave me no answer) so I had thought it could be different. I am still curious to know why you deem this irrelevant, if you like to say.

Cheers, Alberto

@johansid
Copy link

Dear all,
I do migration without dropping any tables.
And this is working now.
I have test all instruction, and its working

Regards,
Johan

-----Original Message-----
From: "webmst" [email protected]
Sent: ‎25/‎2/‎2016 9:17 PM
To: "vitalidze/traccar-web" [email protected]
Subject: Re: [traccar-web] Unable to create a new user - 'username is alreadytaken' (#538)

P.S. Why are you always trying to start a dispute? What's the point?
I am not... please don't think this way! I would like you to be sure I am a friend of yours, pratically supporting you and your great project :-) . What I've written here, has the only purpose of describing what's happening on my side without criticizing, for the sake of solving this issue and nothing else, in the same time serving the traccar-web community; it is just "team-working" and it is necessary to thorough debug and test such a remarkable but complex application you've developed, that could not be improved without the help of many people, each one serving you with their unique end-user-experience.
Looks like you did all steps in a wrong order. Basically, it should be this way:

  1. Stop traccar service
  2. Disable database.changelog option in traccar.xml (comment out or remove)
  3. Drop tables positions and users
  4. Start traccar service.
    As I previously said, I had already dropped the positions and users table and disabled the database.changelog as you suggested, with no change. I understand now that the users table structure is different from what you may expect, but I swear I haven't modified it!
    As you suggested, I will delete the given tables again, still I am not the developer so I cannot know why certain things happen but just report them (BTW, I have found only this minor problem on user management with this critical 3.3 upgrade; I recreated the positions table but it doesn't matter here)
    Speaking about the _label_ing of this issue, I had read all the issues you referenced before and - besides common database issues - I had noticed that none reported the strange behaviour happening with the two browsers (for which you gave me no answer) so I had thought it could be different. I am still curious to know why you deem this irrelevant, if you like to say.
    Cheers, Alberto

    Reply to this email directly or view it on GitHub.

@floor1
Copy link

floor1 commented Feb 25, 2016

Hi

After installing web ui Im not able to log in as admin anymore and when I try to reg new user it replies ´username taken´.

Johan are you using traccar 3.3 and did you follow the instrustion on installing 3.3 web ui ?

I had to upload backup of traccar.xml in order to get in again.

@vitalidze
Copy link
Owner

I am not... please don't think this way!

No problem, I won't think this way. Excuse me for hesitating ;)

As I previously said, I had already dropped the positions and users table and disabled the database.changelog as you suggested, with no change. I understand now that the users table structure is different from what you may expect, but I swear I haven't modified it!

This table structure comes from original version of traccar (from this file https://github.com/tananaev/traccar/blob/master/database/db.changelog-3.1.xml#L21). This means if it is not applied (which should take place after you disabled the database.changelog in traccar.xml), then it should not have this structure, the whole users table must be created by the web UI mod.

Speaking about the labeling of this issue, I had read all the issues you referenced before and - besides common database issues - I had noticed that none reported the strange behaviour happening with the two browsers (for which you gave me no answer) so I had thought it could be different. I am still curious to know why you deem this irrelevant, if you like to say.

It is relevant, but it sounds like a different issue. I have just tried latest version installed on CentOS and over traccar 3.3 and there are no such issue (at least in chrome and IE11). Also no one who installed latest version over 3.3 has reported such issue, but all of them had the issue with 'Username already exist'. Let's fix the issue with 'username already taken' on your server and then if the UI issues still exist - submit them as a separate issues.

@vitalidze
Copy link
Owner

Dear @johansid , thanks for the information. From my understanding people experience issues when they start from scratch. I don't know about migration. Which steps have you performed during migration? Maybe you don't have the database changelog file and it is just not applied, that's why you don't have issues?

@vitalidze
Copy link
Owner

@floor1 Please read discussions here #510 #519 #520 #521 #524

@floor1
Copy link

floor1 commented Feb 25, 2016

Thanks, I already did. I managed to get in but devices are not diaplayed on the map. in log I get this error ´WARN: Table "DEVICE" not found; SQL statement´

@vitalidze
Copy link
Owner

@floor1 this means you have issue with traccar.xml configuration. Please double check all entries there.

@floor1
Copy link

floor1 commented Feb 25, 2016

I went thru it 5 times but maybe I dont unterstand the instrustions right. my files looks like this.

<!-- SERVER CONFIG -->

<entry key='web.enable'>true</entry>
<entry key='web.port'>8082</entry>
<entry key='web.path'>/opt/traccar/web</entry>
<entry key='web.type'>old</entry>
<entry key='web.application'>/opt/traccar/traccar-web.war</entry>

<entry key='geocoder.enable'>true</entry>
<entry key='geocoder.type'>google</entry>

<entry key='logger.enable'>true</entry>
<entry key='logger.level'>all</entry>
<entry key='logger.file'>/opt/traccar/logs/tracker-server.log</entry>

<!-- DATABASE CONFIG -->

<entry key='database.driver'>org.h2.Driver</entry>
<entry key='database.url'>jdbc:h2:/opt/traccar/data/database</entry>
<entry key='database.user'>sa</entry>
<entry key='database.password'></entry>

<!--<entry key='database.changelog'>/opt/traccar/data/db.changelog-master.xml</entry>-->

<entry key='database.selectServers'>
    SELECT * FROM server;
</entry>

<entry key='database.updateServer'>
    UPDATE server SET
    registration = :registration,
    readonly = :readonly,
    map = :map,
    bingKey = :bingKey,
    mapUrl = :mapUrl,
    language = :language,
    distanceUnit = :distanceUnit,
    speedUnit = :speedUnit,
    latitude = :latitude,
    longitude = :longitude,
    zoom = :zoom
    WHERE id = :id;
</entry>

<entry key='database.loginUser'>
    SELECT * FROM users
    WHERE email = :email;
</entry>

<entry key='database.selectUser'>
    SELECT * FROM users
    WHERE id = :id;
</entry>

<entry key='database.selectUsersAll'>
    SELECT * FROM users;
</entry>

<entry key='database.insertUser'>
    INSERT INTO users (name, email, hashedPassword, salt, admin)
    VALUES (:name, :email, :hashedPassword, :salt, :admin);
</entry>

<entry key='database.updateUser'>
    UPDATE users SET
    name = :name,
    email = :email,
    admin = :admin,
    map = :map,
    language = :language,
    distanceUnit = :distanceUnit,
    speedUnit = :speedUnit,
    latitude = :latitude,
    longitude = :longitude,
    zoom = :zoom
    WHERE id = :id;
</entry>

<entry key='database.updateUserPassword'>
    UPDATE users SET hashedPassword = :hashedPassword, salt = :salt WHERE id = :id;
</entry>

<entry key='database.deleteUser'>
    DELETE FROM users WHERE id = :id;
</entry>

<entry key='database.getPermissionsAll'>
    SELECT userId, deviceId FROM user_device;
</entry>

<entry key='database.selectDevicesAll'>
SELECT * FROM device;
</entry>

<entry key='database.selectDevices'>
    SELECT * FROM devices d INNER JOIN user_device ud ON d.id = ud.deviceId WHERE ud.userId = :userId;
</entry>

<entry key='database.insertDevice'>
    INSERT INTO devices (name, uniqueId) VALUES (:name, :uniqueId);
</entry>

<entry key='database.updateDevice'>
    UPDATE devices SET name = :name, uniqueId = :uniqueId WHERE id = :id;
</entry>

<entry key='database.updateDeviceStatus'>
    UPDATE devices SET status = :status, lastUpdate = :lastUpdate WHERE id = :id;
</entry>

<entry key='database.deleteDevice'>
    DELETE FROM devices WHERE id = :id;
</entry>

<entry key='database.linkDevice'>
    INSERT INTO user_device (userId, deviceId) VALUES (:userId, :deviceId);
</entry>

<entry key='database.unlinkDevice'>
    DELETE FROM user_device WHERE userId = :userId AND deviceId = :deviceId;
</entry>

<entry key='database.selectPositions'>
    SELECT * FROM positions WHERE deviceId = :deviceId AND fixTime BETWEEN :from AND :to ORDER BY fixTime;
</entry>

<entry key='database.insertPosition'>
INSERT INTO positions (device_id, protocol, serverTime, time, valid, latitude, longitude, altitude, speed, course, address, other)
VALUES (:deviceId, :protocol, CURRENT_TIMESTAMP(), :time, :valid, :latitude, :longitude, :altitude, :speed, :course, :address, :attributes);
</entry>

<entry key='database.selectLatestPositions'>
SELECT id, protocol, device_id AS deviceId, serverTime, time AS deviceTime, time AS fixTime, 
valid, latitude, longitude, altitude, speed, course, address, other AS attributes 
FROM positions WHERE id IN (SELECT latestPosition_id FROM devices);
</entry>

<entry key='database.updateLatestPosition'>
UPDATE devices SET latestPosition_id = :id WHERE id = :deviceId;
</entry>

<!-- PROTOCOL CONFIG -->

@vitalidze
Copy link
Owner

This is the incorrect query:

<entry key='database.selectDevicesAll'>
SELECT * FROM device;
</entry>

Table name must be devices (ending with s).

@floor1
Copy link

floor1 commented Feb 25, 2016

Thanks, I was also wondering if thats was the problem. I got confused because this is written above SQL query to select list of GPS tracking devices (does not apply to 3.3) so I passed it.

Looks like it is working now Thanks Vitaly:)

@webmst
Copy link
Author

webmst commented Feb 25, 2016

@vitalidze

Hi Vitaly,
thanks to your replies to me and to @johansid I figured out how to solve this issue, but - as you will read on - it is not so satisfactory, i.e. it is not telling us exactly where and when problems arise.

You are absolutely right in saying that problems arise from migrations; even if it is the most common scenario, this puts you in the akward situation of supporting users not knowing enough about their working environment, leaving you to guess what's currently happening.

So, having assumed that traccar-web works perfectly in the ideal situation of having precise control over tables creation, I decided to drop the entire traccar database instead of just deleting again the users and positions tables and then to start traccar immediately with your mod already applied. As a result, problems were all gone (excluding the issue with chrome). To confirm the good standing, I eventually found the different structure for the users table you may expect.

Please consider that you generally raccomended users to start with an original working traccar installation (this means that tables have already been generated) and then to apply your mod. At this point and with this last upgrade, you suggested users to delete the users and positions tables and to disable database.changelog, but it seems that some problems were still remaining.

To summarize, to solve this kind of database problems I had to

  • start with a fresh traccar 3.3 installation without starting it
  • install the traccar-web mod
  • edit traccar.xml for all the required modifications including the disable of database.changelog
  • create a blank traccar database
  • start the service

At least (and using MySQL), it worked for me.

Hope this helps.

Now, let me know what you suggest to do with the chrome issue.

@johansid
Copy link

Dear webmst,

I agree with you in traccar 3.0 migration.
I have mistaken for previous email, no dropping anything just for traccar 2.0

-----Original Message-----
From: "webmst" [email protected]
Sent: ‎26/‎2/‎2016 4:25 AM
To: "vitalidze/traccar-web" [email protected]
Cc: "Johan W" [email protected]
Subject: Re: [traccar-web] Unable to create a new user - 'username is alreadytaken' (#538)

@vitalidze
Hi Vitaly,
thanks to your replies to me and to @johansid I figured out how to solve this issue, but - as you will read on - it is not so satisfactory, i.e. it is not telling us exactly where and when problems arise.
You are absolutely right in saying that problems arise from a migration; even if it is the most common scenario, this puts you in the akward situation of supporting users not knowing enough about their working environment, leaving you to guess what's currently happening.
So, having assumed that traccar-web works perfectly in the ideal situation of having precise control over tables creation, I decided to drop the entire traccar database instead of just deleting again the users and positions tables and then to start traccar immediately with your mod already applied. As a result, problems were all gone, (including the issue with Chrome). To confirm the good standing, I eventually found the different structure for the users table you may expect.
Please consider that you generally raccomended users to start with an original working traccar installation (this means that tables have already been generated) and then to apply your mod. At this point and with this last upgrade, you suggested users to delete the users and positions tables and to disable database.changelog, but it seems that some problems were still remaining.
To summarize, to solve this kind of database problems I had to
start with a freshtraccar 3.3
install the traccar-web mod
edit traccar.xml for all the required modifications including the disable of database.changelog
create a blank traccar database
start the service
At least (and using MySQL), it worked for me.
Hope this helps.

Reply to this email directly or view it on GitHub.

@vitalidze
Copy link
Owner

At least (and using MySQL), it worked for me.

That's great.

Now, let me know what you suggest to do with the chrome issue.

You can submit it separately. But I cannot reproduce it. Maybe you need to clean up the browser cache? Also, are you able to reproduce it on demo site https://d.traccar.litvak.su/ ?

@webmst
Copy link
Author

webmst commented Feb 26, 2016

Thank you Vitaly for your valuable support with the database problems.
Regarding the chrome issue I will perform some tests to collect all the evidence and then I will open a new thread.

@webmst webmst closed this as completed Feb 26, 2016
vitalidze referenced this issue Feb 29, 2016
…to log in after installing over traccar v3.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants