Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors testing the NFT examples #35

Closed
kalwalt opened this issue Jan 27, 2020 · 17 comments
Closed

Errors testing the NFT examples #35

kalwalt opened this issue Jan 27, 2020 · 17 comments
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@kalwalt
Copy link
Owner

kalwalt commented Jan 27, 2020

Hi @kalwalt @nicolocarpignoli @ThorstenBux.

Hope you all are doing well. Great work guys. Congratulations!!!

I tested your examples.
I can run "main_threejs_wasm_worker.html" without any errors and I can see the sphere with my custom image.

Remaining 4 scripts which are:

  1. "threejs_worker_gltf.html"
  2. "main_threejs_worker.html"
  3. "main.html"
  4. "main_worker.html"

All gives common error which is: Uncaught SyntaxError: Unexpected end of input
at artoolkit.worker.js:1 @ /build/artoolkit.min.js: 13

and additionally, main.html also throws : main.js:108 Uncaught ReferenceError: ARCameraParam is not defined
at load (main.js:108)
at start (main.js:199)
at HTMLVideoElement. (main.html:52) main.js:108

Please help guys.
Thanks in advamce

Originally posted by @manojahuja11 in #1 (comment)

@manojahuja11
Copy link

I think the problem is with the artoolkit.min.js
When I unminified the js file, it is incomplete.

I have attached a screenshot of the 2 errors I am getting with the js file

ss

and also, by looking at line 13 in artoolkit.min.js

ss1

I thing there is something wrong with ArcameraParam

I am using chrome on windows and Oneplus 5T for testing.

And, I generated the tracking files on linux machine as I do not have Windows 10 pro or above for installing docker.

Thanks again @kalwalt @nicolocarpignoli

@kalwalt kalwalt mentioned this issue Jan 27, 2020
15 tasks
@kalwalt
Copy link
Owner Author

kalwalt commented Jan 27, 2020

@manojahuja11 i need also other infos: where did you grab the code: did you git clone the repo? or do you download the package? Are you trying to rebuild the libs with emscripten?

And, I generated the tracking files on linux machine as I do not have Windows 10 pro or above for installing docker.

If you mean the (.fset .iset .fset3 files) i think it is not needed to install Docker at all. You need only node and npm installed.

@manojahuja11
Copy link

manojahuja11 commented Jan 28, 2020

Hi @kalwalt . I followed the steps from the readme file.

I git cloned the repo and rebuild the project using docker on Ubuntu 18.04 LTS Desktop.
I was able to generate the files and accurately track the image using Web Assembly version.
But no luck with other 4 examples.

and I installed npm as mentioned in the readme.
I used the web version of NFT marker creator to generate the files.

Thank you

@kalwalt
Copy link
Owner Author

kalwalt commented Jan 28, 2020

Sorry, I can' t reproduce your isssues. All works fine for me. Maybe @nicolocarpignoli has an idea?

@nicolocarpignoli
Copy link
Collaborator

nicolocarpignoli commented Jan 28, 2020

I think the issue is with the build. All those errors can be there because the file is not complete. You should try with docker, the other way is kind of deprecated and may not work.

Try with docker and let us know :)

@kalwalt I think we have to remove the non-docker way from the Readme or at least state that is deprecated and may not work.

@kalwalt
Copy link
Owner Author

kalwalt commented Jan 28, 2020

@nicolocarpignoli he has compiled the libs with Docker.
@manojahuja11 can you post here in a zip file your libs? I will look at those files.

@nicolocarpignoli
Copy link
Collaborator

Sorry I mistaken. So @manojahuja11 after using docker, the error you encounter is the same?

@manojahuja11
Copy link

Hi @kalwalt @nicolocarpignoli

Here's the link to the whole jsartooklit5 folder.
https://drive.google.com/open?id=1XFnNUSP1cwZ9Wl2QVfEFpfcXW61zomJj

Let me give you some more details on how I have build the files:

  1. cloned the jsartoolkit5 and artoolkit5
  2. created a link inside jsartoolkit5/emscripten/ named artoolkit5 and moved all the files to jsartoolkit5/emscripten/artoolkit5 (On Ubuntu)
  3. Then I installed docker (Step 1 from build the project)
  4. ran "npm install" command from inside the jsartoolkit5 directory.
  5. Done step 4 from build project (donwload and start the container)
  6. Done step 5 from build the project ( build the JS version of artoolkit5 )
  7. Did not stopped and removed the container as mentioned in the steps 6 and 7 (as I did not knew when to stop and remove it)

And this is it, please let me know if I have done something wrong or if I have missed any steps.

And one more thing, once the .fset .iset .fset3 files are generated, do we need those other files? like the emscripten folder and all those other ones? Or we just need to put those 3 files in dataNFT folder and modify the html and js files and run it.

@kalwalt
Copy link
Owner Author

kalwalt commented Jan 29, 2020

@manojahuja11 i will look at your files. But one question: Do you need to build the libs? Do you want to make your modifies to the jsartoolkit5 libs (artoolkit.min.js and so on?) if not, if you want only create your html files with your NFT markers this step is not necessary at all.

And this is it, please let me know if I have done something wrong or if I have missed any steps.

i don't see something wrong.

And one more thing, once the .fset .iset .fset3 files are generated, do we need those other files? like the emscripten folder and all those other ones? Or we just need to put those 3 files in dataNFT folder and modify the html and js files and run it.

If you want only test your NFT marker ( the 3 files: .fset .iset and .fset3) just put them ina folder in the DataNFT folder and change the url in the .js script. The emscripten folder it'is only needed if you want to build your own modified libs as said above.
Build the libs with Docker or not can be a challenge, we have already seen this issue. The strange thing is this issue that you encounter with Docker. Does might be that is a different version? @TorstenBux could be Docker trzeci/emscripten-slim:latest has changed in the meantime?

@kalwalt
Copy link
Owner Author

kalwalt commented Jan 29, 2020

it seems that latest could be updated in the meantime running this command

sudo docker exec emscripten emcc -v

i get:

 sudo docker exec emscripten emcc -v
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 1.39.4
clang version 6.0.1 (https://github.com/emscripten-core/emscripten-fastcomp-clang 98df4be387dde3e3918fa5bbb5fc43e1a0e1daac) (https://github.com/emscripten-core/emscripten-fastcomp 6c7e775325067e33fa60611e619a8b987b6d0c35) (emscripten 1.38.44 : 1.38.31)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /emsdk_portable/clang/tag-e1.39.4/build_tag-e1.39.4_64/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.3.0
shared:INFO: (Emscripten: Running sanity checks)
shared:WARNING: java does not seem to exist, required for closure compiler, which is optional (define JAVA in /emsdk_portable/.emscripten if you want it)
shared:WARNING: closure compiler will not be available

but could be also an issue with npm using a different uglifyjs version /type i think, i need to investigate into this.

@manojahuja11
Copy link

manojahuja11 commented Jan 29, 2020

Hi @kalwalt

So, I did something. And its working now.
So, for testing, I uploaded the jsartoolkit5 folder on my server. Previously, only wasm version was working.

Now, all the examples are working.

Let me explain what I did:

Previously, I generated the 3 files in my linux machine, and imported in my windows machine.

Now, what I did is, I took the whole folder from the linux machine and imported it in my windows machine and on my server too. And magically, everything is working fine now.

Only one problem, camera quality is very bad in 2nd and 3rd example (Android Phone). It cannot track any image. It works fine in google chrome (Windows)
Any solution for that?

Thank you again guys!

@kalwalt
Copy link
Owner Author

kalwalt commented Jan 29, 2020

Now, what I did is, I took the whole folder from the linux machine and imported it in my windows machine and on my server too. And magically, everything is working fine now.

Then probably an issue with the browser or the server you used. You may try with Firefox or another browser, and if you can report the browser version and the server version (python, node or what else) can be useful for other users.

Only one problem, camera quality id very bad (blurr) in some examples.
Any solution for that?

That is another issue. Anyway we want improve this. We let a low resolution to increase performances. You can try to change the width and the height in this part of the code:

var width = ( window.innerWidth < window.innerHeight ) ? 240 : 360;
var height = ( window.innerWidth < window.innerHeight ) ? 360 : 240;

Changing these settings will improve the quality of the video, but maybe lower performances. We need to find an optimal solution for this.

@manojahuja11
Copy link

manojahuja11 commented Jan 29, 2020

I am using Chrome Version 79.0.3945.130.
I tried it in Firefox Version 72.0.2 and it works fine with firefox.

Sure @kalwalt . I will try to modify the settings and make it work.

And I use FileZilla software as a server (FTP client).

@kalwalt kalwalt self-assigned this Jan 30, 2020
@kalwalt kalwalt added good first issue Good for newcomers help wanted Extra attention is needed labels Jan 30, 2020
@manojahuja11
Copy link

Hello @kalwalt @nicolocarpignoli

I am not able to replace the flamingo.glb model with some other model.
I tried it with gltf and glb models, but no luck.
In the console, I can see that the image is getting recognized but the model does not shows up.

Please help. Thanks in advance.

@kalwalt
Copy link
Owner Author

kalwalt commented Feb 8, 2020

Hello @kalwalt @nicolocarpignoli

I am not able to replace the flamingo.glb model with some other model.
I tried it with gltf and glb models, but no luck.
In the console, I can see that the image is getting recognized but the model does not shows up.

Please help. Thanks in advance.

Hi @manojahuja11 have you solved the initial problem? I can help you but please open another issue here or in https://github.com/artoolkitx/jsartoolkit5/issues if it is not related.

@manojahuja11
Copy link

Hi @kalwalt
Sorry for late reply. Yes, I did solved the initial problem.
I have raised a new issue related with the model replacement problem.

Please look into it.
Thanks.

@nicolocarpignoli
Copy link
Collaborator

Thanks, so closing this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants