ManifestChildren throwing InvalidArgumentException in Forge PHP SDK - autodesk-forge

My file is not being translated due to an exception:
Invalid value for 'role', must be one of '2d', '3d', 'graphics', 'manifest', 'thumbnail','Autodesk.CloudPlatform.PropertyDatabase','viewable', 'ifc'
I debugged the SDK and the role that is causing the exception is Autodesk.AEC.ModelData.
The file that I am trying to translate is the same I am used to translate in my application, so I think it is a problem in Forge PHP SDK.

Yes, this is most likely an issue with the PHP SDK for Forge being out-of-date. I see that you already submitted a PR to the codebase - I will contact the dev team to make sure the new role type is recognized properly.

Related

2D viewables from Revit 2022 models do not work in the Forge Viewer

We have a Forge Viewer (GuiViewer3D, v. 7) implementation in our Nuxt app, using a few extensions (MarkupsCore, Measure, FullScreen) and custom docking panels such as a list of viewables to select from. Ever since we upgraded from Revit version 2021 to 2022, we haven't been able to display the 2D viewables from our svf files in the viewer. When we select any 2D viewable, the viewer freezes in this state:
With a few warnings thrown in the console:
Deprecated API usage: No “GlobalWorkerOptions.workerSrc” specified.
and
Warning: getOperatorList - ignoring errors during "GetOperatorList: page 0" task: "r: Cannot read properties of undefined (reading 'X')"
of which the former lead to this stackoverflow post, to which Augusto Goncalves suggested we tried uploading our revit file in your online viewer at https://viewer.autodesk.com/designviews. This works, and so we tried to create a new Nuxt app with a simple Forge Viewer implementation following the v. 7 example guide. This also works.
What we did next was to re-implement the v. 7 viewer in our production app by following the official documentation once again, thus removing any customization and leaving out everything else than the bare minimum. With this v. 7 viewer, running in a node environment on either node version 10.0 or 14.9, the bug persists, ruling out the possibility of any custom code being the cause.
Upon further debugging of scripts (loaded in via Autodesk) such as pdf.js, CompGeom.min.js, PDFLoader.js, path2d.js etc., we’ve gotten to a point where this message appears, and this is where our current trail ends:
TypeError: Cannot read properties of undefined (reading 'X') at c.strokeClipperContour (https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/extensions/CompGeom/CompGeom.min.js:17:173979) at https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/extensions/CompGeom/CompGeom.min.js:17:177686 at https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/extensions/CompGeom/CompGeom.min.js:17:177811 at Array.map (<anonymous>) at c.fill (https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/extensions/CompGeom/CompGeom.min.js:17:177413) at t.value https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/extensions/CompGeom/CompGeom.min.js:17:16067) at t.value (https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/extensions/CompGeom/CompGeom.min.js:17:9554) at e.beginDrawing (https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/extensions/PDF/PDF.min.js:39:211570) at t.value (https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/extensions/PDF/PDF.min.js:39:185323) at ttps://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/extensions/PDF/PDF.min.js:39:158419
We cannot effectively debug these minified scripts, and are hoping you can provide some insight as to what might be causing this issue.

Autodesk Forge Design automation - Revit IO: unable to upload application package to design automation app

I am trying to explore design automation for Revit by exploring the code at https://github.com/Autodesk-Forge/design.automation-nodejs-revit.window.family.create.
When I run the application, I get an error message
"Failed to create the family:( "
and the following log -
jstree.min.js:5 [Deprecation] document.registerElement is deprecated
and will be removed in M73, around March 2019. Please use
window.customElements.define instead. See
https://www.chromestatus.com/features/4642138092470272 for more
details. (anonymous) # jstree.min.js:5 ForgeTree.js:348 Uncaught
TypeError: Cannot read property 'className' of undefined
at refreshTypeList (ForgeTree.js:348)
at HTMLSpanElement.spanRemove.onclick (ForgeTree.js:339)
Also while following the instruction in the provided code, most of the links give in README.md for Postman collection (https://github.com/Developer-Autodesk/design-automation-for-revit/blob/master/Docs/AppBundle.md ) was in-accessible to me.
The error you mentioned is on the browser side and it's related to the jsTree, which needs updating due to a browser change. We're fixing it on our samples.
About the overall error, it probably due to a missing setup on the sample. As a suggestion, I would suggest a basic tutorial for Design Automation. Back to the error, you probably need to check the reports.txt to see what happened during the Workitem execution.
We're also fixing a few broken links on the documentation, sorry about that. Are you looking for anything specific?
Update
Design Automation requires code:all scope.

Adyen drop-in Checkout SDK failing on validation

I am trying to use drop-in Checkout using the guide here:
https://docs.adyen.com/developers/checkout/web-sdk
I can successfully see the payment screen but I get warnings in the console:
WARNING: securedFields:: the encryption algorithm is not present. It will not be possible to encrypt input fields
and as soon as I enter the credit card details I get an error:
Uncaught TypeError: adyen.createEncryption is not a function
at Object.a._createEncryption (securedFields.1.3.0.min.js:79)
at Object.a._getEncryptedData (securedFields.1.3.0.min.js:81)
at n (securedFields.1.3.0.min.js:326)
at A (securedFields.1.3.0.min.js:313)
at o.processValidationsObj (securedFields.1.3.0.min.js:320)
at HTMLInputElement.n (securedFields.1.3.0.min.js:209)
In the browser console "adyen" is not defined.
Any suggestion?
Eventually this was resolved by Adyen support.
It was due to the merchant account being setup as Point of Sale (POS).
Creating new "eCommerce" account solved the issue.

Error uploading app to Windows Store with WindowsPhoneReservedAppInfo.xml file

We have referred to this MSDN article for help on locking down the hardware buttons on our device.
The article is pretty straightforward and I managed to generate a prov.xml file with the help of our manufacture however when we try and upload our app to the Windows Store we get the following error:
Package acceptance validation error: File WindowsPhoneReservedAppInfo.xml is invalid: The 'Id' attribute is invalid - The value 'ID_CAP_ENTERPRISE_SHARED_DATA' is invalid according to its datatype 'http://schemas.microsoft.com/phone/2013/windowsphonereservedappinfo:ST_SoftwareCapability' - The Enumeration constraint failed.
I would have thought we would be required to include the WindowsPhoneReservedAppInfo.xml as described in the article above so that when we download the app we can lockdown the hardware buttons.
It's worth noting that if you don't have this file and attempt to lockdown you get the following error:
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
For anyone interested in the code that does the lockdown here it is (although the code works I just thought I would try and give a bit of context):
Dim _GUID As Guid = Windows.Embedded.DeviceLockdown.DeviceLockdownProfile.GetCurrentLockdownProfile()
If Windows.Embedded.DeviceLockdown.DeviceLockdownProfile.GetLockdownProfileInformation(_GUID).Name <> "Associate" Then
For Each G As Guid In Windows.Embedded.DeviceLockdown.DeviceLockdownProfile.GetSupportedLockdownProfiles()
If (Windows.Embedded.DeviceLockdown.DeviceLockdownProfile.GetLockdownProfileInformation(G).Name.Equals("Associate", StringComparison.CurrentCultureIgnoreCase)) Then
Await Windows.Embedded.DeviceLockdown.DeviceLockdownProfile.ApplyLockdownProfileAsync(G)
End If
Next
End If
Catch ex As Exception
End Try
We use the role Associate in the prov.xml file. The prov.xml file does lockdown the device as we want it too and that only works if we have the WindowsPhoneReservedAppInfo.xml file as described in the MSDN article so I can't understand why we can't upload to the Windows Store.
Does anyone have any ideas on how I should be uploading our app to the Windows Store?
I've spoken with our manufacturer and they have said this:
I have a strong feeling this cannot be used in a store app due to Microsoft rules…. So it looks like you can only use this in an Enterprise signed application (Which you then side load onto the device or download using a MDM).
That being the case I will have to look into MDM.

Wirecloud FI-Ware Testbed compatibility

I was wondering if Wirecloud offers complete support for object storage with FI-WARE Testbed instead of Fi-lab. I have successfully integrated Wirecloud with Testbed and have developed a set of widgets that are able to upload/download files to specific containers in Fi-lab with success. However, the same widgets do not seem to work in Fi-lab, as i get an error 500 when trying to retrieve the auth tokens (also with the well known object-storage-test widget) containing the following response:
SyntaxError: Unexpected token
at Object.parse (native)
at create (/home/fiware/fi-ware-keystone-proxy/controllers/Token.js:343:25)
at callbacks (/home/fiware/fi-ware-keystone-proxy/node_modules/express/lib/router/index.js:164:37)
at param (/home/fiware/fi-ware-keystone-proxy/node_modules/express/lib/router/index.js:138:11)
at pass (/home/fiware/fi-ware-keystone-proxy/node_modules/express/lib/router/index.js:145:5)
at Router._dispatch (/home/fiware/fi-ware-keystone-proxy/node_modules/express/lib/router/index.js:173:5)
at Object.router (/home/fiware/fi-ware-keystone-proxy/node_modules/express/lib/router/index.js:33:10)
at next (/home/fiware/fi-ware-keystone-proxy/node_modules/express/node_modules/connect/lib/proto.js:195:15)
at Object.handle (/home/fiware/fi-ware-keystone-proxy/server.js:31:5)
at next (/home/fiware/fi-ware-keystone-proxy/node_modules/express/node_modules/connect/lib/proto.js:195:15)
I noticed that the token provided in the beggining (to start the transaction) is
token: Object
id: "%fiware_token%"
Any idea regarding what might have gone wrong?
The WireCloud instance available at FI-WARE's testbed is always the latest stable version while the FI-LAB instance is currently outdated, we're working on updating it as soon as possible. One of the things that changes between those versions is the Object Storage API, so sorry for the inconvenience as you will not be able to use widgets/operators using the Object Storage in both environments.
Anyway, the response you were obtaining seems to indicate the object storage instance you are accessing is not working properly, so you will need to send an email to one of the available mail lists for getting help (fiware-testbed-help or fiware-lab-help) telling what is happening to you (remember to include your account information as there are several object storage nodes and ones can be up and the others down).
Regarding the strange request body:
"token": {
id: "%fiware_token%"
}
This behaviour is normal, as the WireCloud client code has no direct access to the IdM token of the user. It's the WireCloud's proxy which replaces the %fiware_token% pattern with the correct value.