We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

“Load Data” with JSON Fails on webserver

Home Forums Puzzles “Load Data” with JSON Fails on webserver

  • This topic has 5 replies, 2 voices, and was last updated 1 month ago by kdv.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #77276
    justin_blender
    Customer

    Hello,

    I have a very simple “load data” of a json file. It works fine on the virtual server of Verge3D. But once I upload the project to a webserver, the loading does not work anymore. In the Network Tab I can see that the file gets loaded successfully. It is a pretty normal Apache Server, nothing special.

    https://simulux.de/dev/3D/test2/test2.html

    Console log:

    visual_logic.js:157 puzzle load file: Cannot read properties of null (reading 'startsWith')
    loadFile	@	visual_logic.js:157
    await in loadFile		
    PL.init	@	visual_logic.js:168
    (anonymous)	@	test2.js:53
    (anonymous)	@	v3d.js:1
    (...)

    I uploaded the project to the v3d net and no problem there

    https://cdn.soft8soft.com/AROAJSY2GOEHMOFUVPIOE:55ad6bb829/test2/test2.html

    Attachments:
    You must be logged in to view attached files.
    #77279
    kdv
    Participant

    Add missing mime types or rename .json to .txt or smth else.

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

    #77319
    justin_blender
    Customer

    Thanks for your suggestions!

    I added the MIME Type, but it did not help.
    I am not sure if that is the problem, as the Network tab is showing the JSON content correctly (see screenshot of first post) – and the problem comes from the visual_logic.js.

    I can load txt files, but I cannot process them as a dict in Puzzles :scratch:

    #77320
    justin_blender
    Customer

    Ok I found out that its actually working in Edge. So maybe adding the MIME kicks in and the old config is still cached in chrome, or chrome is generally the problem. Ill post the result later once I found it.

    #77322
    justin_blender
    Customer

    It generally works in all browsers now. It was most probably the mime configuration. Thank you so much!

    #77323
    kdv
    Participant

    I can load txt files, but I cannot process them as a dict in Puzzles

    Actually, you can read JSON from files with any extention (or even without it).

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.