Autodesk-Forge/bim360appstore-model.derivative-nodejs-xls.exporter

Cannot read property 'forEach' of undefined

Opened this issue · 5 comments

when I try to Exptort, I get this err:
ForgeXLS.js:189 Uncaught TypeError: Cannot read property 'forEach' of undefined
at Object.getAllElementsOnCategory (ForgeXLS.js:189)
at ForgeXLS.js:176
at Array.forEach ()
at Object.prepareRawData (ForgeXLS.js:174)
at ForgeXLS.js:166
at Object.success (ForgeXLS.js:44)
at i (jquery.min.js:2)
at Object.fireWith [as resolveWith] (jquery.min.js:2)
at A (jquery.min.js:4)
at XMLHttpRequest. (jquery.min.js:4)

I also have the same issue. Could you fix it?

this is probably happening for specific files, can you provide more info on the file you're using it?

I use the version released here in the main page and deplyed on heroku. This is happening into ForgeXLS.js when trying to export to XLS pushing the button.

Downloading metadata...
ForgeXLS.js:56 Downloading hierarchy...
ForgeXLS.js:61 Downloading properties...
ForgeXLS.js:191 Uncaught TypeError: Cannot read property 'forEach' of undefined
at Object.getAllElementsOnCategory (ForgeXLS.js:191)
at ForgeXLS.js:178
at Array.forEach ()
at Object.prepareRawData (ForgeXLS.js:176)
at ForgeXLS.js:168
at Object.success (ForgeXLS.js:46)
at u (jquery.min.js:2)
at Object.fireWith [as resolveWith] (jquery.min.js:2)
at k (jquery.min.js:2)
at XMLHttpRequest. (jquery.min.js:2)
getAllElementsOnCategory @ ForgeXLS.js:191
(anonymous) @ ForgeXLS.js:178
prepareRawData @ ForgeXLS.js:176
(anonymous) @ ForgeXLS.js:168
success @ ForgeXLS.js:46
u @ jquery.min.js:2
fireWith @ jquery.min.js:2
k @ jquery.min.js:2
(anonymous) @ jquery.min.js:2
load (async)
send @ jquery.min.js:2
ajax @ jquery.min.js:2
forgeGetRequest @ ForgeXLS.js:32
getProperties @ ForgeXLS.js:62
(anonymous) @ ForgeXLS.js:167
success @ ForgeXLS.js:46
u @ jquery.min.js:2
fireWith @ jquery.min.js:2
k @ jquery.min.js:2
(anonymous) @ jquery.min.js:2
load (async)
send @ jquery.min.js:2
ajax @ jquery.min.js:2
forgeGetRequest @ ForgeXLS.js:32
getHierarchy @ ForgeXLS.js:57
(anonymous) @ ForgeXLS.js:166
success @ ForgeXLS.js:46
u @ jquery.min.js:2
fireWith @ jquery.min.js:2
k @ jquery.min.js:2
(anonymous) @ jquery.min.js:2
load (async)
send @ jquery.min.js:2
ajax @ jquery.min.js:2
forgeGetRequest @ ForgeXLS.js:32
getMetadata @ ForgeXLS.js:52
prepareTables @ ForgeXLS.js:159
downloadXLSX @ ForgeXLS.js:77
button1.onClick @ xlsextension.js:39
(anonymous) @ Button.js:32

It seems the variable category is empty
hierarchy.data.objects[0].objects.forEach(function (category)

Just in case
Google Chrome Versión 75.0.3770.142 (Build oficial) (64 bits)

interesting, indeed we should have a check at that point, we're reviewing these sample, will fix it.

Sounds good. I hope being soon ;)