- This topic has 5 replies, 2 voices, and was last updated 2 years ago by
kdv.
-
AuthorPosts
-
2024-09-09 at 6:46 pm #77276
justin_blenderCustomerHello,
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:
2024-09-09 at 9:18 pm #77279kdv
ParticipantAdd 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.
2024-09-11 at 1:04 pm #77319
justin_blenderCustomerThanks 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
2024-09-11 at 1:41 pm #77320
justin_blenderCustomerOk 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.
2024-09-11 at 4:41 pm #77322
justin_blenderCustomerIt generally works in all browsers now. It was most probably the mime configuration. Thank you so much!
2024-09-11 at 10:07 pm #77323kdv
ParticipantI 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.
-
AuthorPosts
- You must be logged in to reply to this topic.

