Issue with the AutoDesk Forge Viewer API - javascript

While getting the document to load, I am getting this error
wgs.js:21467 Uncaught TypeError: Cannot read property 'numGeoms' of undefined
at d.RenderModel.initialize (wgs.js:21467)
at a.onModelRootLoadDone (viewer3D.min.js:4484)
at Worker.p (viewer3D.min.js:4432)
RenderModel.initialize # wgs.js:21467
a.onModelRootLoadDone # viewer3D.min.js:4484
p # viewer3D.min.js:4432
viewer3D.min.js:4446 Uncaught TypeError: Cannot read property
'meshToGeometry' of undefined
at a.processReceivedMesh (viewer3D.min.js:4446)
at a.processReceivedMesh2D (viewer3D.min.js:4465)
at Worker.p (viewer3D.min.js:4432)
a.processReceivedMesh # viewer3D.min.js:4446
a.processReceivedMesh2D # viewer3D.min.js:4465
p # viewer3D.min.js:4432
validator.html:1 [.Offscreen-For-WebGL-0x55a2800ad520]GL ERROR:GL_INVALID_FRAMEBUFFER_OPERATION : glClear: framebuffer incomplete (check) 59 viewer3D.min.js:4446
Uncaught TypeError: Cannot read property 'meshToGeometry' of undefined
at a.processReceivedMesh (viewer3D.min.js:4446)
at a.processReceivedMesh2D (viewer3D.min.js:4465)
at Worker.p (viewer3D.min.js:4432)
Can anyone please help ?

This problem may be caused by the use of an outdated version of the viewer.
Currently the Viewer is on Version 3.3 I will suggest doing the migration to solve your problem and also take advantage of all the new functionality.
Here is a list of the changelogs
https://developer.autodesk.com/en/docs/viewer/v2/overview/changelog/
And here the blog post about the newer version
https://forge.autodesk.com/blog/viewer-release-notes-v33

Related

Annotation Google Chart error

Who knows, what's going wrong with Google Annotation Charts? It doesn't work right now. I get
Uncaught TypeError: Cannot read property 'prototype' of null
In my console. This error in google library, not in my code.
I think Google is updating the Annotation Chart API
Testcode: https://jsfiddle.net/lecaoquochung/dsmgL9wj/15/
or Google Document page
https://developers.google.com/chart/interactive/docs/gallery/annotationchart
P.S. I met the same error today (20160229) with the testcode above (It's runnning up to yesterday and I haven't fixed anything with the code. Keep updating)
Uncaught TypeError: Cannot read property 'prototype' of null
O
(anonymous function)
e
google.a.c.Xc
google.a.c.Oa
google.a.Oa
(anonymous function)
Update 20160301: Google has updated chart package to ver 44
google.charts.load('44', {'packages':['annotationchart'], 'language': 'ja'});
Testcode: https://jsfiddle.net/dsmgL9wj/17/ (Annotation Chart version 44)
The workaround is to explicitly specify previous version of the API to load instead of using current:
google.charts.load('current', {
'packages': ['annotationchart']
});
Instead of current use 43
google.charts.load('43', {
'packages': ['annotationchart']
});

elFinder issues. Undefined is not a function error when trying to copy file

I'm trying to implement elFinder file manager.
This is what I've done.
Included files:
$arr_css = array(
"main.css",
"jquery-ui.css",
"elfinder.min.css",
"theme.css"
);
$arr_js = array(
"jquery.js",
"main.js",
"jquery-ui.js",
"elfinder.min.js",
"elfinder.ru.js"
);
(main.js and main.css are arrays used to create <link rel='stylesheet'> and <script type='text/javascript'>)
In my main page there is a
<div id='fileStructure'>
<div id="elfinder"> </div>
</div>
which I use to initialize elfinder:
$(document).ready(function() {
var elf = $('#elfinder').elfinder({
lang: 'ru', // language (OPTIONAL)
url : '/radio/elfinder-2.0-rc1/php/connector.php' // connector URL (REQUIRED)
}).elfinder('instance');
});
This is, what I have now. It looks fine, I can create directories, files, can upload them. But when I try to copy it it says:
Uncaught TypeError: undefined is not a functionelfinder.min.js:2841 elFinder.commands.copy.execelfinder.min.js:1746 (anonymous function)elfinder.min.js:1706 (anonymous function)jquery.js:3058 jQuery.event.dispatchjquery.js:2676 jQuery.event.add.elemData.handle.eventHandle
The same mistake is on other actions like, cut remove and others.
When I look in script I see that mistake is in string with
return a.each(this.files(b), function (a, b) {
if (!b.read || !b.phash) return !d.reject(["errCopy", b.name, "errPerm"])
}), d.isRejected() ? d : d.resolve(c.clipboard(this.hashes(b))
I don't really understand why it is happening because structure isn't clear for me:
d = this
b = a(b)
and a is parameter of main function of elfinder
(function (a) {
Anyone can help me to solve the problem? May be someone met similar issue?
UPDATE
Uncaught TypeError: undefined is not a functionelfinder.min.js:2860 elFinder.commands.cut.execelfinder.min.js:1746 (anonymous function)elfinder.min.js:1706 (anonymous function)jquery.js:3058 jQuery.event.dispatchjquery.js:2676 jQuery.event.add.elemData.handle.eventHandle
Uncaught TypeError: undefined is not a functionelfinder.min.js:4249 elFinder.commands.rm.execelfinder.min.js:1746 (anonymous function)elfinder.min.js:1706 (anonymous function)jquery.js:3058 jQuery.event.dispatchjquery.js:2676 jQuery.event.add.elemData.handle.eventHandle
From your URL (/radio/elfinder-2.0-rc1/php/connector.php) it seems that you're using Elfinder 2.0 RC1.
You should know that Studio 42 (the company who developed elFinder) hasn't updated or developed any code for elFinder since 2012. The user nao-pon has been responsible for the development and bug fixes lately.
So, you should download a Nightly build to use the latest updated code. That should probably solve your issues.

From live site to a localhost Javascript Errors

I'm quite new to Javascript, I copied my live site to localhost so I could work on it without having to touch the live site. The local site looks just like the live site, but doesn't work like it at all.
The Fancybox box popups aren't working now, and these are the errors I'm getting on my console log:
index.php?option=com_users&view=custom&layout=default_step4:107 Uncaught TypeError: undefined is not a functionindex.php?option=com_users&view=custom&layout=default_step4:107 (anonymous function)jquery.min.js:2 p.Callbacks.kjquery.min.js:2 p.Callbacks.l.fireWithjquery.min.js:2 p.extend.readyjquery.min.js:2 D
index.php?option=com_users&view=custom&layout=default_step4:399 Uncaught TypeError: undefined is not a functionindex.php?option=com_users&view=custom&layout=default_step4:399 (anonymous function)jquery.min.js:2 v.Callbacks.ljquery.min.js:2 v.Callbacks.c.fireWithjquery.min.js:2 v.extend.readyjquery.min.js:2 A
all.js:61 Invalid App Id: Must be a number or numeric string representing the application id.
all.js:61 FB.getLoginStatus() called before calling FB.init().
kallyas_script.js:32 Uncaught TypeError: undefined is not a functionkallyas_script.js:32 (anonymous function)jquery.min.js:2 v.event.dispatchjquery.min.js:2 v.event.add.o.handle.u
index.php?option=com_users&view=custom&layout=default_step4:336 Uncaught TypeError: undefined is not a functionindex.php?option=com_users&view=custom&layout=default_step4:336 reportindex.php?option=com_users&view=custom&layout=default_step4:480 onchange

Vline.js is giving cryptic error message

I am trying the room example of vline and getting a cryptic error message which is am not able to figure out.
Please see the exception stack below.
vline.js?t=1231:732
Local stream: W91AhWvMK6ohUoNi meeting:108
User came online, starting mediasession with: bakbak:biplav.saraf#gmail.com meeting:123
[140623 12:31:36.22] [vline.person] Cannot read property 'log' of undefined
TypeError: Cannot read property 'log' of undefined
at Qh.f (https://static.vline.com/vline.js?t=1231:195:297)
at oh (https://static.vline.com/vline.js?t=1231:187:418)
at W.n.dispatchEvent (https://static.vline.com/vline.js?t=1231:186:432)
at W.n.vj (https://static.vline.com/vline.js?t=1231:194:348)
at W.n.dispatchEvent (https://static.vline.com/vline.js?t=1231:193:416)
at Kl (https://static.vline.com/vline.js?t=1231:366:162)
at W.n.start (https://static.vline.com/vline.js?t=1231:358:142)
at bm.n.Oe (https://static.vline.com/vline.js?t=1231:374:279)
at startPeerMediaSession (http://localhost:5000/schedule/meeting:93:26)
at bm.<anonymous> (http://localhost:5000/schedule/meeting:124:13)
vline.js?t=1231:132
Be vline.js?t=1231:132
ze.Vs vline.js?t=1231:132
n.log vline.js?t=1231:127
Qh.f vline.js?t=1231:195
oh vline.js?t=1231:187
n.dispatchEvent vline.js?t=1231:186
n.vj vline.js?t=1231:194
n.dispatchEvent vline.js?t=1231:193
Nh vline.js?t=1231:194
n.xn vline.js?t=1231:384
oh vline.js?t=1231:187
n.dispatchEvent vline.js?t=1231:186
n.vj vline.js?t=1231:194
n.vj vline.js?t=1231:201
n.dispatchEvent vline.js?t=1231:193
Nh vline.js?t=1231:194
S vline.js?t=1231:207
ci vline.js?t=1231:206
mi vline.js?t=1231:209
n.kr vline.js?t=1231:439
Fo vline.js?t=1231:471
Go.send vline.js?t=1231:471
(anonymous function) vline.js?t=1231:488
$a.forEach.d vline.js?t=1231:75
sp vline.js?t=1231:488
(anonymous function) vline.js?t=1231:500
xh vline.js?t=1231:189
Is it possible to get unminified version of this file?
On further debugging i figured out that i was using a global variable which was conflicting with vline.js.

TwitterWidget within SilverStripe

I am trying to integrate TwitterWidget within SilverStripe.
That's the plugin I am trying to use:
https://twitter.com/about/resources/widgets/widget_profile
If I put this code in a simple *.html file the widget works. Unfortunately I get an error if I try to use it in a *.ss file.
I downloaded the source code to find out where the error occurs. After several hours I found something pretty confusing:
That's the piece of code where the error occurs:
document.write('<div class="twtr-widget" id="'+this.id+'"></div>')
FireBug:
uncaught exception: [Exception... "An attempt was made to use an object that is not, or is no longer, usable" code: "11" nsresult: "0x8053000b (NS_ERROR_DOM_INVALID_STATE_ERR)" location: "http://www.domain.com/mysite/javascript/widget.js?m=1321187964 Line: 257"]
LeftAn...8532904 (Zeile 883)
function() {return new ActiveXObject('Microsoft.XMLHTTP')},
After a few refreshes sometimes FireBug reports:
An attempt was made to use an object that is not, or is no longer, usable
[Bei diesem Fehler anhalten] document.write('<div class="twtr-widget" id="'+this.id+'"></div>')
Google Chrome JavaScript Debugger:
Uncaught TypeError: Object #<Document> has no method 'write' //widget.js:257
TWTR.Widget.init //widget.js:257
TWTR.Widget //widget.js:211
(anonymous function) //?stage=Stage&flush=1:117
f.extend._Deferred.e.resolveWith //jquery-1.6.4.min.js:2
e.extend.ready //jquery-1.6.4.min.js:2
c.addEventListener.C //jquery-1.6.4.min.js:2
This is a little incomplete to debug, but why not use one of the readily available widgets? Like http://www.silverstripe.org/twitter-widget-pack-widget/

Categories