Domoticz error! Cross-Origin? Topic is solved

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Post Reply
dcc86
Posts: 11
Joined: Wednesday 10 July 2019 21:11
Target OS: -
Domoticz version:
Contact:

Domoticz error! Cross-Origin?

Post by dcc86 »

Hi All,

I have domoticz running on my synology and this works perfect.
I want to expand with Dashticz but i can't get it worked i tried different version (master, beta and v3) but it doesn't sort my problem.
Also tried different browers...
i followed the following guide to install:

Steps
* Install/activate WebStation via Package Station
* Install/activate PHP via Package Station
* Via Main Menu -> Web station select your preferred HTTP backend server
(assumption: nginx)
* At the same page verify that an PHP version is activated.
* In "Web station" -> "PHP settings" verify that the curl extension is selected.
* Download the latest Dashticz beta branch and copy the complete branch to the web folder.
* Edit custom/CONFIG.js with the basic settings according the installation instructions on the Wiki
Now Dashticz should run on http://[IP of Synology-nas]/dashticz_v2

Well dashticz does run but i can't get connected with domoticz (get the: Domoticz error!
Please, double check the path to Domoticz in Settings!), the ip adress is absolutely right get the following information when debugged (firefox):

Synchrone XMLHttpRequest op de hoofdthread wordt niet meer ondersteund vanwege de nadelige effecten op de eindgebruikerservaring. Zie http://xhr.spec.whatwg.org/ voor meer informatie jquery.min.js:4:15143
Cross-Origin-aanvraag geblokkeerd: de Same Origin Policy staat het lezen van de externe bron op http://192.168.178.12:8084/json.htm?typ ... order=Name niet toe. (Reden: ontbrekend token ‘content-type’ in CORS-header ‘Access-Control-Allow-Headers’ van CORS-preflight-kanaal).

Cross-Origin-aanvraag geblokkeerd: de Same Origin Policy staat het lezen van de externe bron op http://192.168.178.12:8084/json.htm?typ ... order=Name niet toe. (Reden: CORS-aanvraag is niet gelukt).

Google chrome debugging gives:
(index):1 Access to XMLHttpRequest at 'http://192.168.178.12:8080/json.htm?typ ... order=Name' from origin 'http://192.168.178.12' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
main.js?v=1563084782796:1012 Domoticz error!
Please, double check the path to Domoticz in Settings!
error @ main.js?v=1563084782796:1012

Domoticz error!
Please, double check the path to Domoticz in Settings!


when i open http://192.168.178.12:8084/json.htm?typ ... order=Name in the browser i get all the information from domoticz right....

Can please someone help me with this?

Many thanks in advance,
dcc86
Posts: 11
Joined: Wednesday 10 July 2019 21:11
Target OS: -
Domoticz version:
Contact:

Re: Domoticz error! Cross-Origin?

Post by dcc86 »

Hi all,

still no luck.... i used https://crossorigin.me/ & https://cors-anywhere.herokuapp.com/ in the settings as default CORS url but still got the same problem? Anyone who can help me with this?

Many thanks in advance,
dcc86
Posts: 11
Joined: Wednesday 10 July 2019 21:11
Target OS: -
Domoticz version:
Contact:

Re: Domoticz error! Cross-Origin?

Post by dcc86 »

I can't sort it myself..... €50,- for the one who can fix it for me f.e. with teamviewer....
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Domoticz error! Cross-Origin?

Post by waaren »

dcc86 wrote: Monday 15 July 2019 20:56 I can't sort it myself..... €50,- for the one who can fix it for me f.e. with teamviewer....
Suggest you spend the 50 Euro on a Raspberry :D Connect it with berryboot to your Synology and you will have the best of both worlds + some additional advantages like hourly snapshots and the option to compile domoticz from source.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
HansieNL
Posts: 957
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz error! Cross-Origin?

Post by HansieNL »

I agree with waaren. I think a Raspi is easier to configure.
Blah blah blah
dcc86
Posts: 11
Joined: Wednesday 10 July 2019 21:11
Target OS: -
Domoticz version:
Contact:

Re: Domoticz error! Cross-Origin?

Post by dcc86 »

waaren wrote:
dcc86 wrote: Monday 15 July 2019 20:56 I can't sort it myself..... €50,- for the one who can fix it for me f.e. with teamviewer....
Suggest you spend the 50 Euro on a Raspberry :D Connect it with berryboot to your Synology and you will have the best of both worlds + some additional advantages like hourly snapshots and the option to compile domoticz from source.
To be honest i got a raspberry pi unused. I swapped from raspberry to synology. So install bootberry and then install domoticz and dashticz on the raspberry? Thanks in advance for your help!

Verstuurd vanaf mijn SM-G960F met Tapatalk

User avatar
HansieNL
Posts: 957
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz error! Cross-Origin?

Post by HansieNL »

dcc86 wrote: Tuesday 16 July 2019 20:15
waaren wrote:
dcc86 wrote: Monday 15 July 2019 20:56 I can't sort it myself..... €50,- for the one who can fix it for me f.e. with teamviewer....
Suggest you spend the 50 Euro on a Raspberry :D Connect it with berryboot to your Synology and you will have the best of both worlds + some additional advantages like hourly snapshots and the option to compile domoticz from source.
To be honest i got a raspberry pi unused. I swapped from raspberry to synology. So install bootberry and then install domoticz and dashticz on the raspberry? Thanks in advance for your help!

Verstuurd vanaf mijn SM-G960F met Tapatalk
Or just install webserver and Dashticz on the Raspberry. Than you can keep Domoticz running on your Synology.
Blah blah blah
dcc86
Posts: 11
Joined: Wednesday 10 July 2019 21:11
Target OS: -
Domoticz version:
Contact:

Re: Domoticz error! Cross-Origin?

Post by dcc86 »

HansieNL wrote:
dcc86 wrote: Tuesday 16 July 2019 20:15
waaren wrote: Suggest you spend the 50 Euro on a Raspberry :D Connect it with berryboot to your Synology and you will have the best of both worlds + some additional advantages like hourly snapshots and the option to compile domoticz from source.
To be honest i got a raspberry pi unused. I swapped from raspberry to synology. So install bootberry and then install domoticz and dashticz on the raspberry? Thanks in advance for your help!

Verstuurd vanaf mijn SM-G960F met Tapatalk
Or just install webserver and Dashticz on the Raspberry. Than you can keep Domoticz running on your Synology.
Going to give it a try! Thanks for your help!

Verstuurd vanaf mijn SM-G960F met Tapatalk

User avatar
HansieNL
Posts: 957
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz error! Cross-Origin?

Post by HansieNL »

@dcc86: Tip: Setting up an NGINX web server on a Raspberry Pi (with PHP) https://www.raspberrypi.org/documentati ... r/nginx.md
For Dashticz make the following changes: $ sudo apt-get install php7.0-curl php7.0-xml
Set permissions on the web directory /var/www/html:
$ sudo chown www-data:www-data /var/www/html
$ sudo chmod 775 /var/www/html
$ sudo usermod -a -G www-data pi
Last edited by HansieNL on Tuesday 16 July 2019 21:30, edited 3 times in total.
Blah blah blah
dcc86
Posts: 11
Joined: Wednesday 10 July 2019 21:11
Target OS: -
Domoticz version:
Contact:

Re: Domoticz error! Cross-Origin?

Post by dcc86 »

HansieNL wrote:@dcc86: Tip: Setting up an NGINX web server on a Raspberry Pi (with PHP) https://www.raspberrypi.org/documentati ... r/nginx.md
Thanks! Berryboot is not necesarry in that case? Just the webserver and after that dashticz?

Verstuurd vanaf mijn SM-G960F met Tapatalk

User avatar
HansieNL
Posts: 957
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz error! Cross-Origin?

Post by HansieNL »

dcc86 wrote: Tuesday 16 July 2019 21:28
HansieNL wrote:@dcc86: Tip: Setting up an NGINX web server on a Raspberry Pi (with PHP) https://www.raspberrypi.org/documentati ... r/nginx.md
Thanks! Berryboot is not necesarry in that case? Just the webserver and after that dashticz?

Verstuurd vanaf mijn SM-G960F met Tapatalk
Nope, just install Raspbian Stretch Lite and webserver and Dashticz ofcourse. Because the Buster version is only shown on the Raspberry download page you have to download it from here: https://downloads.raspberrypi.org/raspbian/images/
Blah blah blah
dcc86
Posts: 11
Joined: Wednesday 10 July 2019 21:11
Target OS: -
Domoticz version:
Contact:

Re: Domoticz error! Cross-Origin?

Post by dcc86 »

This problem is solved. Apparantly domoticz say it's updating on a synology by loading and completing the update screen but doesn't do a thing! updated to the latest version manually and dashticz works! many thanks for help guys!
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests