Coder Social home page Coder Social logo

DOS-box loading issues about js-dos HOT 6 CLOSED

caiiiycuk avatar caiiiycuk commented on May 19, 2024
DOS-box loading issues

from js-dos.

Comments (6)

caiiiycuk avatar caiiiycuk commented on May 19, 2024

Hi! I think that you didn't see any error in console because you have not declare catch blocks. Try this:

    Dos(document.getElementById("jsdos")).ready((fs, main) => {
      fs.extract("test/digger.zip").then(() => {
        main(["DIGGER.COM"])
      }).catch((err) => console.log(err));
    }).catch((err) => console.log(err));

or

    Dos(document.getElementById("jsdos"), {onerror: (err) => console.log(err)}).ready((fs, main) => {
      fs.extract("test/digger.zip").then(() => {
        main(["DIGGER.COM"])
      }).catch((err) => console.log(err));
    });

from js-dos.

Holdberg avatar Holdberg commented on May 19, 2024

Thanks for reply!
My mistake, added what you recommend and got this in Firefox:

  1. First suggested code (at my local machine console showing the same error, but starts js-dos without problem):

TypeError: Dos(...).ready(...) is undefined dist3:19:43
http://zapuskdva.shn-host.ru/dist3/:19
[INFO] Resolving DosBox 4.9% js-dos-module.ts:66:44
[INFO] Resolving DosBox 22.6% js-dos-module.ts:66:44

  1. second suggested code:

http://zapuskdva.shn-host.ru/dist3/
[INFO] Resolving DosBox 4.9% js-dos-module.ts:66:44
[INFO] Resolving DosBox 22.6% js-dos-module.ts:66:44
CompileError: wasm validation error: at offset 603: bad type dist3:19:62

And in Chrome:

Second code:

Uncaught (in promise) CompileError: AsyncCompile: Wasm decoding failed: invalid local type @+602
(index):1 Uncaught (in promise) CompileError: AsyncCompile: Wasm decoding failed: invalid local type @+602
(index):19 CompileError: AsyncCompile: Wasm decoding failed: invalid local type @+602

from js-dos.

caiiiycuk avatar caiiiycuk commented on May 19, 2024

How did you create your project? Looks like http://zapuskdva.shn-host.ru/dist3/wdosbox.wasm.js no actually wasm file.
I checked it with md5 and it is not same as on js-dos site:

caiiiycuk@caiiiycuk-xps:/tmp$ curl http://zapuskdva.shn-host.ru/dist3/wdosbox.wasm.js -o 1.wasm
caiiiycuk@caiiiycuk-xps:/tmp$ curl http://js-dos.com/6.22/current/wdosbox.wasm.js -o 2.wasm

caiiiycuk@caiiiycuk-xps:/tmp$ md5sum 1.wasm 2.wasm 
43251c4767f04865ec730f49a7e84cf8  1.wasm
a057aefbc5eb38cdd1ba0e0f013600ca  2.wasm

from js-dos.

Holdberg avatar Holdberg commented on May 19, 2024

Thanks for your time!
It was a very strange problem - sending files by Filezilla corrupting wdosbox.wasm.js, which i took from your latest release.
According to your suggestion about different files i've just uploaded wasm.js by cPanel uploader and everything seems working normal!
Once again, thank you!

from js-dos.

Holdberg avatar Holdberg commented on May 19, 2024

Ah, and one more, may be it will help someone later.

Guide how to fix uploading

from js-dos.

caiiiycuk avatar caiiiycuk commented on May 19, 2024

Good to know. Thank you. I added console.error as default error output

from js-dos.

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.