Website not loading

Chris7 years ago

I'm using the linux installation of 3.16 with openjdk 8, running behind an nginx- SSL proxy, the traccar.xml is "original" except for the DB- Config (mysql).
The website stops with the loader - in the traccar (or nginx-) logs (even with debug turned on), no errors show up, in the browser I get the following errors:

DeviceImages.js:29 Uncaught DOMException: Failed to read the 'contentDocument' property from 'HTMLObjectElement': Blocked a frame with origin "https://traccar.mydomain.org" from accessing a cross-origin frame.
at https://traccar.mydomain.org/app/store/DeviceImages.js:29:58
at https://traccar.mydomain.org/app/store/DeviceImages.js:36:7
[E] [Loader] The following classes failed to load:
   log @ ext-all-debug.js:9392
   logx @ ext-all-debug.js:9428
   Ext.apply.log.log.error @ ext-all-debug.js:9431
   (anonymous) @ ext-all-debug.js:19698
   (anonymous) @ ext-all-debug.js:6877
   (anonymous) @ ext-all-debug.js:7067
   setTimeout (async)
   defer @ ext-all-debug.js:7063
   checkReady @ ext-all-debug.js:19696
   onLoadSuccess @ ext-all-debug.js:19459
   notify @ ext-all-debug.js:1016
   processLoadedEntries @ ext-all-debug.js:998
   notifyRequests @ ext-all-debug.js:1398
   complete @ ext-all-debug.js:1265
   (anonymous) @ ext-all-debug.js:1268
   el.onload @ ext-all-debug.js:1186
   ext-all-debug.js:9392
[E] [Loader] Traccar.store.DeviceImages from app/store/DeviceImages.js

nginx-config:

upstream traccar_server  {
  server 127.0.0.1:8082; #Traccar Server
}
...
...
location / {
  proxy_set_header X-Forwarded-Host $host;
  proxy_set_header X-Forwarded-Server $host;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_http_version 1.1;
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection "upgrade";

  proxy_redirect http://traccar_server/ /;
  proxy_redirect ws://traccar_server/api/socket /api/socket;
  proxy_pass http://traccar_server;
  proxy_set_header Host $host;
  proxy_connect_timeout 43200000;
  proxy_send_timeout    43200000;
  proxy_read_timeout    43200000;
}

Thanks for any help,
Regards Chris

Anton Tananaev7 years ago

Are you sure you haven't edited the error message?

Chris7 years ago

I have edited the domain yes - not the context afaik... I'll post the extract from the logfile again here, to prevent hickups:

    traccar.example.org/:1 Refused to display 'https://traccar.example.org/images/......(A FEW MORE OF THESE ABOVE...)
    traccar.example.org/:1 Refused to display 'https://traccar.example.org/images/van.svg' in a frame because it set 'X-Frame-Options' to 'deny'.
    ext-all-debug.js:38524 Slow network is detected. Fallback font will be used while loading: https://cdnjs.cloudflare.com/ajax/libs/extjs/6.2.0/classic/theme-triton/resources/fonts/OpenSans-Light.ttf
    DeviceImages.js:29 Uncaught DOMException: Failed to read the 'contentDocument' property from 'HTMLObjectElement': Blocked a frame with origin "https://traccar.example.org" from accessing a cross-origin frame.
        at https://traccar.example.org/app/store/DeviceImages.js:29:58
        at https://traccar.example.org/app/store/DeviceImages.js:36:7
    (anonymous) @ DeviceImages.js:29
    (anonymous) @ DeviceImages.js:36
    ext-all-debug.js:9392 [E] [Loader] The following classes failed to load:
    log @ ext-all-debug.js:9392
    logx @ ext-all-debug.js:9428
    Ext.apply.log.log.error @ ext-all-debug.js:9431
    (anonymous) @ ext-all-debug.js:19698
    (anonymous) @ ext-all-debug.js:6877
    (anonymous) @ ext-all-debug.js:7067
    setTimeout (async)
    defer @ ext-all-debug.js:7063
    checkReady @ ext-all-debug.js:19696
    onLoadSuccess @ ext-all-debug.js:19459
    notify @ ext-all-debug.js:1016
    processLoadedEntries @ ext-all-debug.js:998
    notifyRequests @ ext-all-debug.js:1398
    complete @ ext-all-debug.js:1265
    (anonymous) @ ext-all-debug.js:1268
    el.onload @ ext-all-debug.js:1186
    ext-all-debug.js:9392 [E] [Loader] Traccar.store.DeviceImages from app/store/DeviceImages.js
    log @ ext-all-debug.js:9392
    logx @ ext-all-debug.js:9428
    Ext.apply.log.log.error @ ext-all-debug.js:9431
    (anonymous) @ ext-all-debug.js:19700
    (anonymous) @ ext-all-debug.js:6877
    (anonymous) @ ext-all-debug.js:7067
    setTimeout (async)
    defer @ ext-all-debug.js:7063
    checkReady @ ext-all-debug.js:19696
    onLoadSuccess @ ext-all-debug.js:19459
    notify @ ext-all-debug.js:1016
    processLoadedEntries @ ext-all-debug.js:998
    notifyRequests @ ext-all-debug.js:1398
    complete @ ext-all-debug.js:1265
    (anonymous) @ ext-all-debug.js:1268
    el.onload @ ext-all-debug.js:1186

Thanks, Chris

Anton Tananaev7 years ago

Looks like you are using frame and the error says that it's not allowed. I don't really know what the problem is, but it doesn't seem to be with Traccar itself.

Chris7 years ago

That was a good hint - though it'd seem to me that traccar is using frames/iframes?
My proxy configuration stated

    add_header X-Frame-Options DENY;

I changed it to

    add_header X-Frame-Options SAMEORIGIN;

and it works fine now :)

Thanks!