You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Friday, May 15th 2020, 8:51am

Uncaught TypeError: Cannot read property 'index' of undefined in tour.js

I am sometimes getting this issue when on the loadscene command running from javascript. Sometimes it is work find and switch between panoramas but sometimes not. Do you guys have any ideas about why this could happen? Thank you in advance.


Source code

1
krpano_services.call("goto_pano('pano-scene-"+pano.id+"', 'hsp_"+$scope.local.hotspot.id+"');")


Source code

1
2
3
4
5
6
7
<action name="goto_pano">
showlog(true);
trace(%1);
trace(%2);
looktohotspot(%2, 45, smooth(500,500,500));
loadscene(%1, null, MERGE, BLEND(1));
</action>


Source code

1
2
3
INFO: krpano 1.20.6 (build 2020-04-15)
INFO: pano-scene-16105
INFO: hsp_25566

Quoted

VM3678:1 Uncaught TypeError: Cannot read property 'index' of undefined
at vb.removearrayitem.removeItem (eval at embedpano (tour.js:10), <anonymous>:1:49198)
at k (eval at embedpano (tour.js:10), <anonymous>:1:150007)
at v (eval at embedpano (tour.js:10), <anonymous>:1:153101)
at eval (eval at embedpano (tour.js:10), <anonymous>:1:149196)
at eval (eval at embedpano (tour.js:10), <anonymous>:1:74850)
at w (eval at embedpano (tour.js:10), <anonymous>:1:74572)
at G (eval at embedpano (tour.js:10), <anonymous>:1:74683)
at eval (eval at embedpano (tour.js:10), <anonymous>:1:74818)
at Object.b [as loadxml] (eval at embedpano (tour.js:10), <anonymous>:1:149125)
at Function.n.loadscene (eval at embedpano (tour.js:10), <anonymous>:1:102553)
removearrayitem.removeItem @ VM3678:1
Virtual tours 360° and panoramas hosting - https://trvi.tours. Up to 500MB per panorama

2

Sunday, May 17th 2020, 7:17am

This problem was solved. The "Uncaught TypeError: Cannot read property 'index' of undefined" issue was caused that I have had set the global variable index in my dragondown action. If the 'index' global variable was changed the loadscene(%1, null, MERGE, BLEND(1)); action was bringing me that issue.
Virtual tours 360° and panoramas hosting - https://trvi.tours. Up to 500MB per panorama