GithubHelp home page GithubHelp logo

Comments (15)

ericferon avatar ericferon commented on August 17, 2024 1

Yes, the port was misplaced. Solved (I hope) with v3.2.6.
K.r,

from glpi-archimap.

ericferon avatar ericferon commented on August 17, 2024

I encountered some problems when I made evolve the plugin to the marketplace and GLPI version 10.
One of the consequences was a blank screen.
From my side, it is now solved in v3.2.4.
Can you check whether it solves also your problem ?
K.r,

from glpi-archimap.

zdenkor avatar zdenkor commented on August 17, 2024

I have too problem with blank screen when "Drawing pane" is clicked. GLPI version 9.5.7 and Diagrams version 3.2.4.

Uncaught TypeError: Cannot read properties of undefined (reading 'value')
at XMLHttpRequest.xhr.onreadystatechange (:15:365)

from glpi-archimap.

moodyblue avatar moodyblue commented on August 17, 2024

So I removed archimap from plugins folder and installed 3.2.4 from marketplace. Blank screen continues but with some variants:

  1. If I specify the key name, as in the following screen
    image
    Then Firefox gives this error
    image
  2. If I remove the key name, the Firefox error is different
    image

from glpi-archimap.

jcervantes-sipecom avatar jcervantes-sipecom commented on August 17, 2024

Hi @zdenkor @moodyblue, I had the same issue: #56

Could you try in the APP_TOKEN token configuration cleaning the key value?

Also as I said in my issue, you have to create an API KEY

from glpi-archimap.

ericferon avatar ericferon commented on August 17, 2024

Please have a look to https://github.com/ericferon/glpi-archimap/wiki/How-to-install-and-set-up-the-plugin.
You have indeed to specify the APP_TOKEN entry in the plugin configuration, with an empty key and a value.
K.r,

from glpi-archimap.

moodyblue avatar moodyblue commented on August 17, 2024

The problem continues even after replacing the marketplace version by the plugins version
image

from glpi-archimap.

jcervantes-sipecom avatar jcervantes-sipecom commented on August 17, 2024

Hi @moodyblue, It could be maybe something in your apache server, can you confirm that in any *.conf in /etc/apache2/sites-enabled/ (if it's Ubuntu) don't you have something like this:

<IfModule mod_headers.c>
        Header set Content-Security-Policy "script-src 'strict-dynamic' 'nonce-rAnd0m123' 'unsafe-inline' http: https:; frame-ancestors; 'self';object-src 'none';base-uri 'none'; require-trusted-types-for 'script';"
       Header set X-XSS-Protection "1; mode=block"
--->       Header always append X-Frame-Options SAMEORIGIN
       Header set X-Content-Type-Options nosniff
       Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains"
</IfModule>

from glpi-archimap.

moodyblue avatar moodyblue commented on August 17, 2024

Thanks. I've gone through all .conf files, some of them load module mod_headers.so. but there is no IfModule making any reference to mod_headers

from glpi-archimap.

ericferon avatar ericferon commented on August 17, 2024

The problem is linked with CORS (the Archimap plugin is using the REST API of GLPI for some operations).
Personally, I added these lines to the conf file, to enable CORS :
Header always set Access-Control-Allow-Origin "*"

on the above line, you could be more restrictive and replace * by the url of your GLPI site

    Header always set Access-Control-Allow-Methods "GET, POST, OPTIONS, PUT, DELETE"
    Header always set Access-Control-Allow-Credentials "true"
    Header always set Access-Control-Allow-Headers "X-Requested-With, Content-Type, Origin, Authorization, Accept, Client-Security-Token, Accept-Encoding, App-Token, Session-Token"

and I haven't any line mentioned by jcervantes-sipecom (with or without if)
Header always append X-Frame-Options SAMEORIGIN
K.r,

from glpi-archimap.

moodyblue avatar moodyblue commented on August 17, 2024

Thanks. I will try to enable CORS. It's a non-trivial setup, my server is a QNAP NAS running a proprietary firmware called QTS (based on Linux kernel 5.10.60). There are several Apache versions ported to this platform, I need to test which one supports CORS.

from glpi-archimap.

moodyblue avatar moodyblue commented on August 17, 2024

Maybe the cause is different. My gpli runs in port 4488 and apirest is http://192.168.130.210:4488/GLPI80/apirest.php/

In previous error messages looks like archimap is trying to use port 80 instead

from glpi-archimap.

ericferon avatar ericferon commented on August 17, 2024

Indeed, if you use another port, this is not included in the URL calling apirest.
I added it (v3.2.5).
K.r,

from glpi-archimap.

moodyblue avatar moodyblue commented on August 17, 2024

v3.2.5 puts the port incorrectly http://192.168.130.210/GLPI80:4488/apirest.php/initSession/

It should be http://192.168.130.210:4488/GLPI80/apirest.php/initSession/

Edit: I've tried with apache listening to port 80 and it works. But I would prefer to use port 4488 instead

from glpi-archimap.

moodyblue avatar moodyblue commented on August 17, 2024

Solved with v3.2.6. Thank you very much.

from glpi-archimap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.