Web Interface Help

asiLab2 years ago

Hello,
I'm using IntelliJ to debug a new server protocol, but when i try to start web interface on http://localhost:8082 it stucks on spinner and no interface is loaded. What am I missing?
Any help appreciated.

Gian

Anton Tananaev2 years ago

You should probably check what the errors are.

asiLab2 years ago

Done.. as first thing.. but have nothing in console or debug that indicates errors.

here is my console log. After this the server works perfectly.. I've made no changes to any part. Any idea?

Gian

00:57:42: Executing ':Main.main()'...

Starting Gradle Daemon...
Connected to the target VM, address: '127.0.0.1:64565', transport: 'socket'
Gradle Daemon started in 1 s 176 ms
> Task :extractIncludeProto UP-TO-DATE
> Task :extractProto UP-TO-DATE
> Task :generateProto UP-TO-DATE
Disconnected from the target VM, address: '127.0.0.1:64565', transport: 'socket'
> Task :compileJava UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :classes UP-TO-DATE
Connected to the target VM, address: 'localhost:64576', transport: 'socket'

> Task :Main.main()
2022-06-15 00:57:49  INFO: HikariPool-1 - Starting...
2022-06-15 00:57:49  INFO: HikariPool-1 - Added connection conn0: url=jdbc:h2:./target/database user=SA
2022-06-15 00:57:49  INFO: HikariPool-1 - Start completed.
2022-06-15 00:57:49  INFO: Set default schema name to PUBLIC
2022-06-15 00:57:49  INFO: Clearing database change log checksums
2022-06-15 00:57:50  INFO: Successfully acquired change log lock
2022-06-15 00:57:50  INFO: Successfully released change log lock
2022-06-15 00:57:50  INFO: Successfully acquired change log lock
2022-06-15 00:57:50  INFO: Cannot load service: liquibase.parser.ChangeLogParser: liquibase.parser.core.json.JsonChangeLogParser Unable to get public no-arg constructor
2022-06-15 00:57:50  INFO: Cannot load service: liquibase.parser.ChangeLogParser: liquibase.parser.core.yaml.YamlChangeLogParser Unable to get public no-arg constructor
2022-06-15 00:57:50  INFO: Reading from PUBLIC.DATABASECHANGELOG
2022-06-15 00:57:50  INFO: Reading from PUBLIC.DATABASECHANGELOG
2022-06-15 00:57:50  INFO: Cannot load service: liquibase.hub.HubService: Provider liquibase.hub.core.StandardHubService could not be instantiated
2022-06-15 00:57:50  INFO: Successfully released change log lock
2022-06-15 00:57:50  INFO: Operating system name: Windows 10 version: 10.0 architecture: amd64
2022-06-15 00:57:50  INFO: Java runtime name: OpenJDK 64-Bit Server VM vendor: Oracle Corporation version: 15.0.1+9-18
2022-06-15 00:57:50  INFO: Memory limit heap: 16352mb non-heap: 0mb
2022-06-15 00:57:50  INFO: Character encoding: windows-1252 charset: windows-1252
2022-06-15 00:57:50  INFO: Version: null
2022-06-15 00:57:50  INFO: Starting server...
2022-06-15 00:57:51  WARN: Port disabled due to conflict - Address already in use: bind - BindException (...)
2022-06-15 00:57:51  INFO: jetty-10.0.7; built: 2021-10-06T19:34:02.766Z; git: da8a4553af9dd84080931fa0f8c678cd2d60f3d9; jvm 15.0.1+9-18
2022-06-15 00:57:51  INFO: Started o.t.w.@5785e813{/,null,AVAILABLE}
2022-06-15 00:57:51  INFO: Session workerName=node0
2022-06-15 00:57:51  WARN: JAXBContext implementation could not be found. WADL feature is disabled.
2022-06-15 00:57:52  INFO: Started o.e.j.s.ServletContextHandler@165aa43a{/,null,AVAILABLE}
2022-06-15 00:57:52  INFO: Started ServerConnector@462e1e64{HTTP/1.1, (http/1.1)}{0.0.0.0:8082}
2022-06-15 00:57:52  INFO: Started Server@4fecf308{STARTING}[10.0.7,sto=0] @3428ms
Anton Tananaev2 years ago

Have you checked the browser console?

asiLab2 years ago

good idea.. here we are, you are right... it seems I miss something... but I'm sure i get everything from git...

:8082/lib/extjs/classic/locale/locale-it.js:1          Failed to load resource: the server responded with a status of 404 (Not Found)
:8082/lib/extjs/ext-all.js:1          Failed to load resource: the server responded with a status of 404 (Not Found)
:8082/lib/extjs/classic/theme-triton/theme-triton.js:1          Failed to load resource: the server responded with a status of 404 (Not Found)
theme-triton-all.css:1          Failed to load resource: the server responded with a status of 404 (Not Found)
:8082/lib/extjs/packages/charts/classic/charts.js:1          Failed to load resource: the server responded with a status of 404 (Not Found)
charts-all.css:1          Failed to load resource: the server responded with a status of 404 (Not Found)
ol.css:1          Failed to load resource: the server responded with a status of 404 (Not Found)
ol-layerswitcher.css:1          Failed to load resource: the server responded with a status of 404 (Not Found)
:8082/lib/ol/ol.js:1          Failed to load resource: the server responded with a status of 404 (Not Found)
:8082/lib/ol-layerswitcher/ol-layerswitcher.js:1          Failed to load resource: the server responded with a status of 404 (Not Found)
:8082/lib/proj4/proj4.js:1          Failed to load resource: the server responded with a status of 404 (Not Found)
load.js:123 Uncaught ReferenceError: Ext is not defined
    at load.js:123:13
Anton Tananaev2 years ago

Looks like you haven't done npm install.

asiLab2 years ago

I'm tring from traccar-web dir with powershell (as admin):

PS C:\Users\Gianmaria\IdeaProjects\traccar\traccar-web> npm install
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.

> postinstall
> /bin/bash -c 'mkdir -p web/lib/{ol,ol-layerswitcher,proj4,extjs} && cp node_modules/openlayers-dist/{ol.js,ol.css} web/lib/ol/ && cp node_modules/ol-layerswitcher/dist/{ol-layerswitcher.js,ol-layerswitcher.css} web/lib/ol-layerswitcher/ && cp node_modules/proj4/dist/proj4.js web/lib/proj4/ && cp node_modules/extjs-gpl/build/ext-all.js web/lib/extjs/ && mkdir -p web/lib/extjs/classic && cp -r node_modules/extjs-gpl/build/classic/locale web/lib/extjs/classic/locale && cp -r node_modules/extjs-gpl/build/classic/theme-triton web/lib/extjs/classic/theme-triton && mkdir -p web/lib/extjs/packages/charts && cp -r node_modules/extjs-gpl/build/packages/charts/classic web/lib/extjs/packages/charts/classic'

Impossibile trovare il percorso specificato.
npm ERR! code 1
npm ERR! path C:\Users\Gianmaria\IdeaProjects\traccar\traccar-web
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c /bin/bash -c 'mkdir -p web/lib/{ol,ol-layerswitcher,proj4,extjs} && cp node_modules/openlayers-dist/{ol.js,ol.css} web/lib/ol/ && cp node_modules/ol-layerswitcher/dist/{ol-layerswitcher.js,ol-layerswitcher.css} web/lib/ol-layerswitcher/ && cp node_modules/proj4/dist/proj4.js web/lib/proj4/ && cp node_modules/extjs-gpl/build/ext-all.js web/lib/extjs/ && mkdir -p web/lib/extjs/classic && cp -r node_modules/extjs-gpl/build/classic/locale web/lib/extjs/classic/locale && cp -r node_modules/extjs-gpl/build/classic/theme-triton web/lib/extjs/classic/theme-triton && mkdir -p web/lib/extjs/packages/charts && cp -r node_modules/extjs-gpl/build/packages/charts/classic web/lib/extjs/packages/charts/classic'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Gianmaria\AppData\Local\npm-cache\_logs\2022-06-14T23_33_54_066Z-debug-0.log
PS C:\Users\Gianmaria\IdeaProjects\traccar\traccar-web>
Anton Tananaev2 years ago

It requires bash, as you can see in the output.

jay2 years ago

how can we install npm on a windows machine, if pc does not have bash.

Gianmaria2 years ago

I moved development on linux… a lot of troubles less. Thanks Anton