Skip to content

[o] ERROR: The server is not available. #93

Open

Description

@son1cn

I've had Openframe running for a few months with no issue. A week or so ago it stopped initializing and I started looking into it today. When I run the open frame command, this comes up now:

[o] ERROR: The server is not available.

I tried to reinstall via the regular install script but no avail. I then reflashed raspbian and tried the script on a newly updated OS and still no dice. Openframe 0.4.12 and node 6.9.5.

npm list -g openframe
/home/pi/.nvm/versions/node/v6.9.5/lib
mqq openframe@0.4.12

Has anyone else experienced issue recently? I checked that the pi has access and can ping api.openframe.io with no issue.

Activity

  1. WBWBW commented on Oct 25, 2021

    @WBWBW

    I have the same issue. Just came up after a reboot.

  2. son1cn commented on Oct 26, 2021

    @son1cn
    Author

    @WBWBW Did you do anything besides reboot? I have rebuilt my whole RPi image, confirmed internet access and still no go

  3. WBWBW commented on Oct 26, 2021

    @WBWBW

    No. It looks like it’s the same for everyone. May be the server is no longer maintained or an issue hasn’t been fixed.
    https://openframe.discourse.group/t/error-the-server-is-not-available/183/8

  4. jmwohl commented on Oct 26, 2021

    @jmwohl
    Member

    Hey! Really sorry for the delay — the hosted Openframe server is loosely maintained as time allows! And sadly I haven't had time to look into this yet. The API server is running, otherwise the web app wouldn't load, so it seems as though there's some other issue that's blocking the frame controller from connecting :/. I'll try to find time to look into it ASAP.

  5. jmwohl commented on Oct 26, 2021

    @jmwohl
    Member

    Did anyone try looking at the debug output? I think if you run DEBUG=* openframe when logging in you might get more detailed error info? Not certain, haven't tried it or looked at what debug info is present.

  6. jmwohl commented on Oct 26, 2021

    @jmwohl
    Member

    Also check the config file at ~/.openframe/.ofrc — it's possible this has been corrupted. The "network" property should look like this if you're using the hosted Openframe server:

     "network": {
        "api_base": "https://api.openframe.io",
        "app_base": "https://openframe.io"
      }
    
  7. son1cn commented on Oct 27, 2021

    @son1cn
    Author

    @jmwohl
    Here is the output with the DEBUG flag set:

    pi@raspberrypi:~ $ DEBUG=* openframe
      openframe:config load +0ms
      openframe:frame load +17ms
      openframe:frame inflateStateFromFile +7ms
      openframe:user load +4ms
      superagent GET https://api.openframe.io/explorer/swagger.json +134ms
    
    
    [o]   ERROR: The server is not available.
    
    
      openframe:cli Can't read from server.  It may not have the appropriate access-control-origin settings. +858ms
    

    .ofrc currently:

    pi@raspberrypi:~ $ cat ~/.openframe/.ofrc
    {
      "network": {
        "api_base": "https://api.openframe.io",
        "app_base": "https://openframe.io"
      }
    }
    

    I can confirm that the pi can ping both api.openframe.io and openframe.io. I was even able to WGET the swagger.json that it tries to read before claiming the server is unavailable. Quite peculiar

  8. jmwohl commented on Oct 27, 2021

    @jmwohl
    Member

    @son1cn Thanks for this! Strange indeed, but the CORS error might be a clue — it's possible that something changed on the server (not sure why that would be the case?) or some request-related JS dependency on the Pi that is blocking the request. I'll try to set up a fresh frame and debug further.

  9. WBWBW commented on Nov 13, 2021

    @WBWBW

    @jmwohl
    Did installing from scratch solve it ?

  10. rayber commented on Jan 28, 2022

    @rayber

    I tried installing from scratch and it did not work

  11. Stefterv commented on Feb 4, 2022

    @Stefterv

    I installed a local cors proxy through npm and used that to successfully login:

    npm install no-cors-proxy -g

    no-cors-proxy -p 8000 -t https://api.openframe.io &

    nano ~/.openframe/.ofrc

    {
      "network": {
        "api_base": "http://localhost:8000",
        "app_base": "https://openframe.io"
      }
    }
    

    DEBUG=* openframe

    Now I could login

  12. WBWBW commented on Feb 5, 2022

    @WBWBW

    I installed a local cors proxy through npm and used that to successfully login:

    npm install no-cors-proxy -g

    no-cors-proxy -p 8000 -t https://api.openframe.io &

    nano ~/.openframe/.ofrc

    {
      "network": {
        "api_base": "http://localhost:8000",
        "app_base": "https://openframe.io"
      }
    }
    

    DEBUG=* openframe

    Now I could login

    Awesome! Do you know how to make the proxy persist after a reboot? Thanks for the help!

  13. rayber commented on Feb 8, 2022

    @rayber

    You can add it in ~/.openframe/autoboot.sh and add the following line before the openframe line

    nohup no-cors-proxy -p 8000 -t https://api.openframe.io & >/dev/null 2>&1 &
    
  14. bimalnair commented on Feb 14, 2022

    @bimalnair

    Hi I followed the above instructions and I still get

    ERROR : The server is not available

    Openframe: cli Can't read from server. It may not have appropriate access-control-origin settings.

    What can be done to solve this?

  15. jmwohl commented on Feb 14, 2022

    @jmwohl
    Member

    The cause of this issue is the swagger-client dependency. For whatever reason, using this client to connect to the server no longer works. I haven't had a chance to look into it in detail, but one solution would be to replace the use of this package with a lower-level HTTP request package and make the API requests more manually, or perhaps swap in the openframe-jsclient and use that for API requests.

    Contributions very welcome!!

  16. RasmusNielsen commented on Sep 10, 2022

    @RasmusNielsen

    Excited for this project. Hope this can be kept alive.

  17. hannsQ commented on Jan 19, 2023

    @hannsQ

    hello there :) ... seems that i ran into this problem also, fresh install of a rasberry pi 3, follwed the instructions to install openframe, bit i get this Error: The server is not available.
    this is the debug output:

    setterm: terminal xterm does not support --blank
    setterm: cannot (un)set powersave mode: Unpassender IOCTL (I/O-Control) für das Gerät
    piop@raspberrypi:~ $ DEBUG=* openframe
    openframe:config load +0ms
    openframe:frame load +16ms
    openframe:frame inflateStateFromFile +6ms
    openframe:user load +4ms
    superagent GET https://api.openframe.io/explorer/swagger.json +107ms

    [o] ERROR: The server is not available.

    openframe:cli Can't read from server. It may not have the appropriate access-control-origin settings. +461ms

    is there any solution for this ?
    thanks !!

  18. jmwohl commented on Jan 19, 2023

    @jmwohl
    Member

    Hi @hannsQ — I haven't followed up on this, but I'm fairly certain the solution is replace the swagger-client dependency with simple fetch requests to the API (or maybe to use a different or updated swagger client).

  19. hannsQ commented on Jan 20, 2023

    @hannsQ

    thank you jmwohl for your answer, i just dont know how to do that - where can i replace the swagger-client and with which kind of commad do i make this fetch request to the api?

    Thank you !!

    during installation of openframe following error occured:

    E: Unable to locate package glslviewer
    npm ERR! Linux 5.15.84-v7+
    npm ERR! argv "/home/pi/.nvm/versions/node/v6.9.5/bin/node" "/home/pi/.nvm/versi ons/node/v6.9.5/bin/npm" "install" "-g" "openframe-image@latest"
    npm ERR! node v6.9.5
    npm ERR! npm v3.10.10
    npm ERR! code ELIFECYCLE

    npm ERR! openframe-image@0.2.3 install: ./install.sh
    npm ERR! Exit status 100
    npm ERR!
    npm ERR! Failed at the openframe-image@0.2.3 install script './install.sh'.
    npm ERR! Make sure you have the latest version of node.js and npm installed.
    npm ERR! If you do, this is most likely a problem with the openframe-image packa ge,
    npm ERR! not with npm itself.
    npm ERR! Tell the author that this fails on your system:
    npm ERR! ./install.sh
    npm ERR! You can get information on how to open an issue for this project with:
    npm ERR! npm bugs openframe-image
    npm ERR! Or if that isn't available, you can get their info via:
    npm ERR! npm owner ls openframe-image
    npm ERR! There is likely additional logging output above.

    npm ERR! Please include the following file with any support request:
    npm ERR! /home/pi/npm-debug.log
    /home/pi/.nvm/versions/node/v6.9.5/bin/glslLoader -> /home/pi/.nvm/versions/node /v6.9.5/lib/node_modules/openframe-glslviewer/bin/glslLoader

    openframe-glslviewer@0.2.8 install /home/pi/.nvm/versions/node/v6.9.5/lib/node _modules/openframe-glslviewer
    ./install.sh

    Installing glslViewer...
    ./install.sh: line 36: [: ==: unary operator expected
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    E: Unable to locate package glslviewer
    npm ERR! Linux 5.15.84-v7+
    npm ERR! argv "/home/pi/.nvm/versions/node/v6.9.5/bin/node" "/home/pi/.nvm/versi ons/node/v6.9.5/bin/npm" "install" "-g" "openframe-glslviewer@latest"
    npm ERR! node v6.9.5
    npm ERR! npm v3.10.10
    npm ERR! code ELIFECYCLE

    npm ERR! openframe-glslviewer@0.2.8 install: ./install.sh
    npm ERR! Exit status 100
    npm ERR!
    npm ERR! Failed at the openframe-glslviewer@0.2.8 install script './install.sh'.
    npm ERR! Make sure you have the latest version of node.js and npm installed.
    npm ERR! If you do, this is most likely a problem with the openframe-glslviewer package,
    npm ERR! not with npm itself.
    npm ERR! Tell the author that this fails on your system:
    npm ERR! ./install.sh
    npm ERR! You can get information on how to open an issue for this project with:
    npm ERR! npm bugs openframe-glslviewer
    npm ERR! Or if that isn't available, you can get their info via:
    npm ERR! npm owner ls openframe-glslviewer
    npm ERR! There is likely additional logging output above.

    npm ERR! Please include the following file with any support request:
    npm ERR! /home/pi/npm-debug.log
    ...
    also starting npm with debug flag give this result:

    pi@rasp:~ $ DEBUG=* npm start
    npm ERR! Linux 5.15.84-v7+
    npm ERR! argv "/home/pi/.nvm/versions/node/v6.9.5/bin/node" "/home/pi/.nvm/versions/node/v6.9.5/bin/npm" "start"
    npm ERR! node v6.9.5
    npm ERR! npm v3.10.10
    npm ERR! path /home/pi/package.json
    npm ERR! code ENOENT
    npm ERR! errno -2
    npm ERR! syscall open

    npm ERR! enoent ENOENT: no such file or directory, open '/home/pi/package.json'
    npm ERR! enoent ENOENT: no such file or directory, open '/home/pi/package.json'
    npm ERR! enoent This is most likely not a problem with npm itself
    npm ERR! enoent and is related to npm not being able to find a file.
    npm ERR! enoent

    npm ERR! Please include the following file with any support request:
    npm ERR! /home/pi/npm-debug.log
    pi@rasp:~ $

    thank you!!

  20. jmwohl commented on Jan 23, 2023

    @jmwohl
    Member

    Regarding the swagger-client, it would basically be replacing the contents of this file:

    https://github.com/OpenframeProject/Openframe/blob/master/src/rest.js

    Then updating elsewhere in the app where the rest module is used.

    The other error you're seeing there is unrelated, it seems like maybe glslViewer isn't available as a package in this linux distribution. We may need to go back to installing that manually.

  21. hannsQ commented on Jan 24, 2023

    @hannsQ

    Thanks a lot jmwohl, seems this is beyond my ability.. i will wait for an update, hoping to get openframe running...
    :) tx

  22. brookstalley commented on Mar 11, 2023

    @brookstalley

    I’ve been digging into this a bit… the root cause is the API server not setting the CORS headers, at least on swagger.json. I see that the server is using loopback, and the config has cors:false under remoting, but the loopback documentation suggests there should be a cors:{origin:false} entry under the rest options. This might be a change in loopback?

    I haven’t yet set up a server to test, but figured I’d share.

  23. calebcarpenter1995 commented on Jan 11, 2024

    @calebcarpenter1995

    Is this project being maintained? This thread is from 2021 and this issue is a blocker for 100% of users and basically nullifies the entire project. It's a bad user experience to get all the way to this point in setup and to be blocked at the last step with no indication from the maintainers that it's broken (apart from issues in github).

    Could you update the README or the documentation if this project is going to remain unmaintained and broken?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions