Giter Site home page Giter Site logo

Comments (6)

wongchito avatar wongchito commented on August 18, 2024 1

react-ChmrgLrp.js:33 Uncaught TypeError: crypto.randomUUID is not a function

Hi @Photonnnn ,

You need Chrome>=92 or node>=19 for this method.

from rmg.

thekingofcity avatar thekingofcity commented on August 18, 2024

Hi, rmp and other rmt family projects are supposed to be deployed together. Though technically any of them could be run without others, it might have some dependencies and cause some functions broken.

Sadly, at this moment we do not have any documentation guiding you on how to deploy them, but we do have a reference in our offline application. It was built by grabbing all the gh-pages branches of each project and then put under the root folder of the static server.

Details can be found at:
https://github.com/railmapgen/railmapgen.github.io/blob/2e29bebfbb4f2c9860dfbd6b297fae579ff2e789/.github/workflows/build-tauri.yml#L37-L43

Feel free to reopen if you encounter any issues later :)

from rmg.

Photonnnn avatar Photonnnn commented on August 18, 2024

I've tried these git clone steps but still get some trouble. What I've got now is as shown in the screenshot:
screenshot
The menu bar for lines and stations is missing. And when I click the Rail Map Painter button for example, it doesn't work with error message:

react-ChmrgLrp.js:33 Uncaught TypeError: crypto.randomUUID is not a function
    at openApp (main-DRIKJPKe.js:1:14853)
    at react-ChmrgLrp.js:17:20071
    at Fp.produce (react-ChmrgLrp.js:17:12542)
    at react-ChmrgLrp.js:17:20063
    at Array.reduce (<anonymous>)
    at o (react-ChmrgLrp.js:17:19975)
    at w (react-ChmrgLrp.js:17:21732)
    at react-ChmrgLrp.js:17:6087
    at Object.m [as dispatch] (react-ChmrgLrp.js:17:5185)
    at dispatch (react-ChmrgLrp.js:17:18866)

Here is my root folder:

assets         runtime-demo  .htaccess                    info.json
fonts          .             404.html                     manifest.json
rmg            ..            google9cb3630f882e2561.html  .nojekyll
rmg-palette    .eslintrc     index.html                   logo192.png
rmg-templates  .git          favicon.ico                  logo512.png
rmp            .github       .user.ini                    .prettierrc
rmp-gallery    .gitignore    .eslintrc.dev.json           robots.txt

What should I do to solve this problem? Or shall I offer more error message?
Thank you very much!

from rmg.

thekingofcity avatar thekingofcity commented on August 18, 2024

I can't reproduce your problem with the snippet below:

~$ git clone -b gh-pages --depth 1 https://github.com/railmapgen/railmapgen.github.io.git railmapgen
~$ cd railmapgen
~/railmapgen$ git clone -b gh-pages --depth 1 https://github.com/railmapgen/rmp.git
~/railmapgen$ python3 -m http.server
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...
127.0.0.1 - - [14/Mar/2024 12:46:58] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [14/Mar/2024 12:46:58] "GET /assets/polyfills-dTtI00kG.js HTTP/1.1" 200 -
127.0.0.1 - - [14/Mar/2024 12:46:58] "GET /assets/main-DRIKJPKe.js HTTP/1.1" 200 -
127.0.0.1 - - [14/Mar/2024 12:46:58] "GET /assets/react-ChmrgLrp.js HTTP/1.1" 200 -
127.0.0.1 - - [14/Mar/2024 12:46:58] "GET /assets/chakra-Hg5wZurr.js HTTP/1.1" 200 -
127.0.0.1 - - [14/Mar/2024 12:46:58] "GET /assets/rmg-theme-provider-hiWJ7DBh.js HTTP/1.1" 200 -
127.0.0.1 - - [14/Mar/2024 12:46:58] "GET /assets/rmg-theme-provider-W_P3xS0j.css HTTP/1.1" 200 -
127.0.0.1 - - [14/Mar/2024 12:46:58] "GET /info.json HTTP/1.1" 200 -
127.0.0.1 - - [14/Mar/2024 12:46:58] "GET /logo192.png HTTP/1.1" 200 -
127.0.0.1 - - [14/Mar/2024 12:46:58] "GET /favicon.ico HTTP/1.1" 200 -
127.0.0.1 - - [14/Mar/2024 12:46:59] "GET /assets/app-root-nKniRw37.js HTTP/1.1" 200 -
127.0.0.1 - - [14/Mar/2024 12:46:59] "GET /assets/rmg-fields-7Auzl2dt.js HTTP/1.1" 200 -
127.0.0.1 - - [14/Mar/2024 12:46:59] "GET /assets/rmp-logo512-Hh3pLqZ3.png HTTP/1.1" 200 -
127.0.0.1 - - [14/Mar/2024 12:46:59] "GET /logo512.png HTTP/1.1" 200 -
127.0.0.1 - - [14/Mar/2024 12:47:06] "GET /rmp/ HTTP/1.1" 200 -
127.0.0.1 - - [14/Mar/2024 12:47:06] "GET /rmp/assets/polyfills-FErAv9TW.js HTTP/1.1" 200 -
127.0.0.1 - - [14/Mar/2024 12:47:06] "GET /rmp/styles/fonts.css HTTP/1.1" 200 -
127.0.0.1 - - [14/Mar/2024 12:47:06] "GET /rmp/assets/index-0-k9VRwb.js HTTP/1.1" 200 -
127.0.0.1 - - [14/Mar/2024 12:47:06] "GET /rmp/assets/react-hBmrxY6U.js HTTP/1.1" 200 -
127.0.0.1 - - [14/Mar/2024 12:47:06] "GET /rmp/assets/chakra-sjIlidOs.js HTTP/1.1" 200 -
127.0.0.1 - - [14/Mar/2024 12:47:06] "GET /rmp/assets/index-Kb3IoCvn.css HTTP/1.1" 200 -
127.0.0.1 - - [14/Mar/2024 12:47:07] "GET /rmp/info.json HTTP/1.1" 200 -

When you click Rail Map Painter at the left side of the nav menu, a /rmp/ http get request will be made. Since I could not find that on your screenshot, your railmapgen.github.io might be broken. Recloning the latest railmapgen.github.io might solve the issue.

from rmg.

Photonnnn avatar Photonnnn commented on August 18, 2024

Here is what I've done first:

ubuntu@VM-16-2-ubuntu:/www/wwwroot$ sudo git clone -b gh-pages --depth 1 https://github.com/railmapgen/railmapgen.github.io.git railmapgen
Cloning into 'railmapgen'...
remote: Enumerating objects: 54, done.
remote: Counting objects: 100% (54/54), done.
remote: Compressing objects: 100% (48/48), done.
remote: Total 54 (delta 3), reused 42 (delta 2), pack-reused 0
Receiving objects: 100% (54/54), 5.75 MiB | 137.00 KiB/s, done.
Resolving deltas: 100% (3/3), done.
ubuntu@VM-16-2-ubuntu:/www/wwwroot$ cd railmapgen
ubuntu@VM-16-2-ubuntu:/www/wwwroot/railmapgen$ sudo git clone -b gh-pages --depth 1 https://github.com/railmapgen/rmp.git
Cloning into 'rmp'...
remote: Enumerating objects: 95, done.
remote: Counting objects: 100% (95/95), done.
remote: Compressing objects: 100% (89/89), done.
remote: Total 95 (delta 4), reused 62 (delta 4), pack-reused 0
Receiving objects: 100% (95/95), 2.29 MiB | 1.85 MiB/s, done.
Resolving deltas: 100% (4/4), done.

Then I went to [web server address:8000] and got this (navigation bar for lines and stations still didn't show up)
image
with message below got from my web server

ubuntu@VM-16-2-ubuntu:/www/wwwroot/railmapgen$ python3 -m http.server
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...
[my ip address] - - [15/Mar/2024 23:04:31] code 400, message Bad request version ('\\x00\\x12\\x00\\x10\\x04\\x03\\x08\\x04\\x04\\x01\\x05\\x03\\x08\\x05\\x05\\x01\\x08\\x06\\x06\\x01\\x00')
[my ip address] - - [15/Mar/2024 23:04:31] "\x16\x03\x01\x06à\x01\x00\x06Ü\x03\x03¨jîLF¨b\x04n%\x05\\zh¿Äþ$\x9c\x08\x08T4\x11ÙijmV%Ö3 \x06i\x8c\x89¦ÉÏ\x80§Í²k;\x84\x199êqâ&]Þ0§uõùôNzB»\x00 úú\x13\x01\x13\x02\x13\x03À+À/À,À0̨̩À\x13À\x14\x00\x9c\x00\x9d\x00/\x005\x01\x00\x06sJJ\x00\x00\x00\x0d\x00\x12\x00\x10\x04\x03\x08\x04\x04\x01\x05\x03\x08\x05\x05\x01\x08\x06\x06\x01\x00" 400 -
[my ip address] - - [15/Mar/2024 23:04:31] code 400, message Bad request version ('Hu\\x83\\x95FØ\\x87\\x00')
[my ip address] - - [15/Mar/2024 23:04:31] "\x16\x03\x01\x06 \x01\x00\x06\x9c\x03\x03i\x95'1\x07`x\x8b}\x9d!\x03uóPÙ¶\x0b´ó×e\x98E\\å\x1eã\x13Yáì \x82Ï\x96¦o\x1cº\x178{ðR1\x96Q\x84Ú\x1e\x1cUYc%)\x1cHu\x83\x95FØ\x87\x00 " 400 -
[my ip address] - - [15/Mar/2024 23:04:31] "GET / HTTP/1.1" 200 -
[my ip address] - - [15/Mar/2024 23:04:31] "GET /assets/polyfills-dTtI00kG.js HTTP/1.1" 200 -
[my ip address] - - [15/Mar/2024 23:04:31] "GET /assets/rmg-theme-provider-W_P3xS0j.css HTTP/1.1" 200 -
[my ip address] - - [15/Mar/2024 23:04:31] "GET /assets/react-ChmrgLrp.js HTTP/1.1" 200 -
[my ip address] - - [15/Mar/2024 23:04:31] "GET /assets/rmg-theme-provider-hiWJ7DBh.js HTTP/1.1" 200 -
[my ip address] - - [15/Mar/2024 23:04:31] "GET /assets/chakra-Hg5wZurr.js HTTP/1.1" 200 -
[my ip address] - - [15/Mar/2024 23:04:31] "GET /assets/main-DRIKJPKe.js HTTP/1.1" 200 -
[my ip address] - - [15/Mar/2024 23:04:32] "GET /info.json HTTP/1.1" 200 -
[my ip address] - - [15/Mar/2024 23:04:32] "GET /favicon.ico HTTP/1.1" 200 -
[my ip address] - - [15/Mar/2024 23:04:33] "GET /assets/app-root-nKniRw37.js HTTP/1.1" 304 -
[my ip address] - - [15/Mar/2024 23:04:33] "GET /assets/rmg-fields-7Auzl2dt.js HTTP/1.1" 304 -
[my ip address] - - [15/Mar/2024 23:04:33] "GET /logo512.png HTTP/1.1" 304 -
[my ip address] - - [15/Mar/2024 23:04:33] "GET /assets/rmp-logo512-Hh3pLqZ3.png HTTP/1.1" 304 -

Then when I clicked Rail Map Painter, it still didn't work and no message was got from the web server
image

Here is my system information; I can access to https://railmapgen.gitlab.io/ correctly so I guess there is nothing wrong with my chrome.

ubuntu@VM-16-2-ubuntu:/www/wwwroot/railmapgen$ uname -a
Linux VM-16-2-ubuntu 5.15.0-94-generic #104-Ubuntu SMP Tue Jan 9 15:25:40 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
ubuntu@VM-16-2-ubuntu:/www/wwwroot/railmapgen$ node -v
v20.11.1

I'm configuring the environment using bt panel(bt.cn), especially node. I'm not sure if this could lead to some problems, but as you can see node is available in command line. Here are the modes installed for node:
image
Thank you very much for your patient answer!

from rmg.

Photonnnn avatar Photonnnn commented on August 18, 2024

Problem solved after using https instead of http. :-)

from rmg.

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.