-
Notifications
You must be signed in to change notification settings - Fork 69
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
artoolkit.setup is not a function #40
Comments
@Flikker I'd need some more information on that. |
Thanks for the reply @ThorstenBux `arController = new ARController(video, arCamera); arController.onload = function()...` because that's where the artoolkit.setup gets used. |
Very wired, you've got a special setup using Cordova which I haven't tested. At the moment I cannot say what is going on :( |
Thanks @ThorstenBux |
I get this same issue when I build @Flikker Try using EDIT: Did a deep dive. Tested out Looking at my built version of
I noticed that this also appears the top of Because that statement is there, it defines As for why this statement gets reordered before |
Hi there @Cobertos - sorry for the slow reply. Thanks very much for sharing all the digging you've done on this one; very useful, and it's not an issue I'd considered. I've tried using the debug version but unfortunately it still doesn't seem to have solved the issue for me. At a bit of a loss as to what to try next! |
As it happens I just did a build on my machine and can see that there is the
definition inside artoolkit.debug.js and artoolkit.min.js |
Great - thank you very much! I will have a go with it and let you know.
Thanks again
…On Sun, 15 Jul 2018 at 20:25, Thorsten Bux ***@***.***> wrote:
@Flikker <https://github.com/Flikker> @Cobertos
<https://github.com/Cobertos> I've done some changes in regards to this.
You could checkout the latest master and build. Please let me know if that
helps
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#40 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AMH8S9adyXISxP-AtmFRwFNYPS7YL5Z-ks5uG5c_gaJpZM4RV2WY>
.
|
This issue is still present, 😭 I just tested the master branch, @ThorstenBux where are these new changes in the code? Are you sure they are in the master? |
What are you seeing? Which errors and issues? |
as written in the pull request #79 i get this:
The video (from Data/output_4.mp4) start and it is displayed but the debug draw not. |
@ThorstenBux another aspect of the issue, in the success MediaStream {id: "GcE77sFhwrrfIw19fM0rc4lJkPtPxAXxD86x", active: true, onaddtrack: null, onremovetrack: null, onactive: null, …}
artoolkit.api.js:1556 onload callback should be defined
ARCameraParam @ artoolkit.api.js:1556
success @ simple_rtc.html:55
artoolkit.api.js:1562 onerror callback should be defined
ARCameraParam @ artoolkit.api.js:1562
success @ simple_rtc.html:55
125710artoolkit.api.js:1148 Uncaught TypeError: artoolkit.setup is not a function
at ARController._initialize (artoolkit.api.js:1148)
at new ARController (artoolkit.api.js:120)
at simple_rtc.html:64
ARController._initialize @ artoolkit.api.js:1148
ARController @ artoolkit.api.js:120
(anonymous) @ simple_rtc.html:64
setInterval (async)
cameraParam.onload @ simple_rtc.html:60
(anonymous) @ artoolkit.api.js:1591
writeCallback @ artoolkit.api.js:1785
writeByteArrayToFS @ artoolkit.api.js:1811
oReq.onload @ artoolkit.api.js:1828
load (async)
ajax @ artoolkit.api.js:1823
loadCamera @ artoolkit.api.js:1792
ARCameraParam.load @ artoolkit.api.js:1588
ARCameraParam @ artoolkit.api.js:1568
success @ simple_rtc.html:55 note the warnings about onLoad callback functions not defined ( that is not correct because they exist, right?) |
With the debug lib the app fails to enter in jsartoolkit5/js/artoolkit.api.js Line 1855 in b2a6c75
in this way the function runWhenLoaded(); jsartoolkit5/js/artoolkit.api.js Line 1856 in b2a6c75
is never loaded. see also this report: message: "Cannot read property 'onRuntimeInitialized' of undefined"
stack: "TypeError: Cannot read property 'onRuntimeInitialized' of undefined
at eval (eval at <anonymous> (extensions::messaging:235:9), <anonymous>:1:15)
at extensions::messaging:235:9"
__proto__: Error i solved moving the runWhenLoaded() function before the onRuntimeInitialized: if (window.Module) {
console.log('window module exist:',window.Module);
runWhenLoaded();
window.Module.onRuntimeInitialized = function() {
console.log('we enter in the Runtime!');
var event = new Event('artoolkit-loaded');
window.dispatchEvent(event);
} not sure that is correct but at least a temporary solution. |
I leave this link as a reminder: about onRuntimeInitialized with emscripten |
How this can still not be fixed it's incredible, does no-one use this or no-one use ES6 imports? I'm occuring the same issue, if I go with the "getting started" I have this error when I get files locally (cf this link https://aframe.io/blog/arjs3/#getting-started-with-image-tracking). If I use the distant tags (same as example) it is fine, but if I follow the links, save the JS files and load them in ES6, I receive this error (I don't need to do any more code than just loading). So what I do is, open
And the error occurs I have this code in the top html file but doesn't help a lot
Would be nice if those repo could work with a "simple" npm i, I managed to make aframe-ar works in ES6 but tooks me long, know I'm stuck with this nft version ^^'. |
Didn't knew that project, will do thanks ! |
yes, as @ThorstenBux said, if you are only interested to NFT marker try our webarkit/ARnft but it has not direct aframe support for now (but i'm working on). Hope that will help. |
We are using a-frame because that's actually the solution that work the "best" out of the box, when you try to get every project aside and wrap them together in an ES6 project it's quite a nightmare lol So yeah I'll, I put the repo in fav and will give it a try once we need for a next project ! Thanks. |
@Inateno consider also that there is a PR to add ES6 support to Ar.js. Sad news has not so much time to push in that effort, 😭 Can't do everything.. |
@kalwalt Ahah don't worry I know that pretty much same here ! ^^ |
hello @Inateno What was your final solution? |
Issue by Flikker
Wednesday Sep 27, 2017 at 09:07 GMT
Originally opened as https://github.com/artoolkit/jsartoolkit5/issues/66
I've got jsartoolkit working fine in an Android Cordova app - users click on a link (window.open) and jsartoolkit launches. But if I tap the back button then click on the link again, after a couple of times I get a nostream error saying "Typeerror: artoolkit.setup is not a function". I've pinpointed that it happens when it tries to load the ARCameraParam (Data/camera_para.dat).
It always works fine the first time and if I force close the app then try again.
Anyone know what might be going wrong?
A few possible issues I've thought through:
Thank you for any help or insights you're able to give!
The text was updated successfully, but these errors were encountered: