Simulator: I can't open the browser after I click button鈥渙pen browser"

Created on 19 Sep 2019  路  10Comments  路  Source: lgsvl/simulator

I can't open the browser after I click button鈥渙pen browser"
Screenshot from 2019-09-19 21-49-47

_Originally posted by @gaohongfein in https://github.com/lgsvl/simulator/issues/379#issuecomment-533139685_

bug

Most helpful comment

Here is the change that will fix this:
```
Assets/Scripts/Database/DatabaseManager.cs | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/Assets/Scripts/Database/DatabaseManager.cs b/Assets/Scripts/Database/DatabaseManager.cs
index 1f2c419a..6c5ae2c6 100644
--- a/Assets/Scripts/Database/DatabaseManager.cs
+++ b/Assets/Scripts/Database/DatabaseManager.cs
@@ -43,6 +43,11 @@ namespace Simulator.Database
return $"Data Source = {GetDatabasePath()};version=3;";
}

  • static string UncapitaliseInvariant(string word)
  • {
  • return word.Substring(0, 1).ToLowerInvariant() + word.Substring(1);
  • }
    +
    public static IDatabaseBuildConfiguration GetConfig(string connectionString)
    {
    return DatabaseConfiguration.Build()
    @@ -51,10 +56,10 @@ namespace Simulator.Database
    .UsingDefaultMapper(m =>
    {
    // Vehicle => vehicles
  • m.InflectTableName = (inflector, tn) => inflector.Pluralise(inflector.Uncapitalise(tn));
  • m.InflectTableName = (inflector, tn) => inflector.Pluralise(UncapitaliseInvariant(tn));

                 // TimeOfDay => timeOfDay
    
  • m.InflectColumnName = (inflector, cn) => inflector.Uncapitalise(cn);
  • m.InflectColumnName = (inflector, cn) => UncapitaliseInvariant(cn);
    });
    }
    ```

We'll include it in next push to github.

All 10 comments

Assets and Web UI are built. I tired localhost:8080 but keeps reloding the same page constantly.

What URL is show in web interface? Is it http://localhost:8080/ directly, or is ending with /#/Maps or similar? We have known issue that only opening http://localhost:8080/ URL directly works, you cannot refresh other URLs.

360 There's a similar issue here. Are you trying to run the WebUI behind a proxy?

360 There's a similar issue here. Are you trying to run the WebUI behind a proxy?

I am not using any proxy, especially I had read this issue and canceled the proxy.

What URL is show in web interface? Is it http://localhost:8080/ directly, or is ending with /#/Maps or similar? We have known issue that only opening http://localhost:8080/ URL directly works, you cannot refresh other URLs.

unity

It is only http://localhost:8080/ . After entering creditentials (email and password), web browser automatically refreshes itself and not connecting the Web Ui.

To reproduce the bug, add
Thread.CurrentThread.CurrentCulture = new CultureInfo("tr-TR");
to https://github.com/lgsvl/simulator/blob/master/Assets/Scripts/Web/Loader.cs#L115
Or use a windows pc with Turkish Locale settings.

And when you run it, it will say
`SqliteException: SQLite error

no such column: maps.谋d
`
and it won't open a browser window with the button.
It is deserializing Id to 谋d at some point. I谋 陌i

To fix it, add
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
to https://github.com/lgsvl/simulator/blob/master/Assets/Scripts/Web/Loader.cs#L115
and necessary using statements to the top of the file.
using System.Globalization; using System.Threading;

Thanks, I can reproduce this issue. We'll look into fixing it.

Here is the change that will fix this:
```
Assets/Scripts/Database/DatabaseManager.cs | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/Assets/Scripts/Database/DatabaseManager.cs b/Assets/Scripts/Database/DatabaseManager.cs
index 1f2c419a..6c5ae2c6 100644
--- a/Assets/Scripts/Database/DatabaseManager.cs
+++ b/Assets/Scripts/Database/DatabaseManager.cs
@@ -43,6 +43,11 @@ namespace Simulator.Database
return $"Data Source = {GetDatabasePath()};version=3;";
}

  • static string UncapitaliseInvariant(string word)
  • {
  • return word.Substring(0, 1).ToLowerInvariant() + word.Substring(1);
  • }
    +
    public static IDatabaseBuildConfiguration GetConfig(string connectionString)
    {
    return DatabaseConfiguration.Build()
    @@ -51,10 +56,10 @@ namespace Simulator.Database
    .UsingDefaultMapper(m =>
    {
    // Vehicle => vehicles
  • m.InflectTableName = (inflector, tn) => inflector.Pluralise(inflector.Uncapitalise(tn));
  • m.InflectTableName = (inflector, tn) => inflector.Pluralise(UncapitaliseInvariant(tn));

                 // TimeOfDay => timeOfDay
    
  • m.InflectColumnName = (inflector, cn) => inflector.Uncapitalise(cn);
  • m.InflectColumnName = (inflector, cn) => UncapitaliseInvariant(cn);
    });
    }
    ```

We'll include it in next push to github.

I just discovered this simulator and am running into the same issue after creating an account and logging in. I'm using the 2020.01 release binaries on Fedora 31.

@enginBozkurt @exoticDFT We will look into this issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yumianhuli2 picture yumianhuli2  路  3Comments

jonghl9 picture jonghl9  路  4Comments

fgrzeszc picture fgrzeszc  路  4Comments

christian-lanius picture christian-lanius  路  3Comments

InitialDuan picture InitialDuan  路  5Comments