#grapecity/wijmo throwing run time error after upgrading my Angular project from 8 to 9 - angular9

Recently iam trying to update my angular project from 8 to 9. While updating i also updated wijmo from wijmo/wijmo to #grapecity/wijmo package as it supports IVY.
But after the completing the upgradation, i can able to compile the application but i am getting the following error at run time
global-error-handler.service.ts:43 Error: Uncaught (in promise): TypeError: (0 , t[n]) is not a function
TypeError: (0 , t[n]) is not a function
at backend.js:61
at Reflect.<anonymous> (backend.js:61)
at push../node_modules/#grapecity/wijmo.angular2.grid.detail/__ivy_ngcc__/index.js.__decorate (index.js:28)
at index.js:53
at Object../node_modules/#grapecity/wijmo.angular2.grid.detail/__ivy_ngcc__/index.js (index.js:53)
at __webpack_require__ (bootstrap:84)

I'd like to get some more info about this error. The quick thing to check is property initialization order. In Ivy, the properties are interpreted as they are specified in markup (previously wijmo controlled how they were interpreted). So you can break components by setting certain properties before others.
For example, if I tried to set the selectedIndex on a combobox BEFORE I set the data source, then the app would break at runtime because there are no items in the list to select yet.
More info here: https://www.grapecity.com/wijmo/docs/GettingStarted/Angular-Components#property-initialization-order-in-angular-9-ivy-and-higher
The next thing to check is component decorators (if you are inheriting our components). There are some breaking changes in decorators in Ivy.
For example, you might need to add {descendants: true} to ContentChildren queries.
Or you might need to add an #Injectable decorator to your class.
You can read more about breaking changes in Ivy and how to fix them here: https://angular.io/guide/ivy-compatibility-examples
But please feel free to contact us to work directly: wijmoexperts#grapecity.com

Related

"TypeError: container is undefined" when selecting element created with sceneBuilder using AggregatedView

I'm getting Uncaught TypeError: container is undefined thrown in a loop when I create a custom geometry.
Geometries are created using code from https://forge.autodesk.com/blog/custom-models-forge-viewer
I'm using the AggregatedView. The error does not occur when I instantiate a GuiViewer3D directly.
Uncaught TypeError: container is undefined
getFragmentConsolidationType ConsolidationIterator.js:398
updateRenderProxy ConsolidationIterator.js:416
updateRenderProxy RenderModel.js:973
updateSelectionProxies Viewer3DImpl.js:2145
renderOverlays Viewer3DImpl.js:2152
cmdRenderOverlays Viewer3DImpl.js:1330
executeCommandList Viewer3DImpl.js:913
tick Viewer3DImpl.js:1908
animloop Viewer3DImpl.js:1939
Is this a bug in Autodesk Forge? Using version 7.80
Selecting a custom geometry with the AggregatedView.
Expected the object to be selected.
Instead an error is thrown continuously.
The engineering team confirmed that this is a problem with the SceneBuilder extension not being compatible with "model consolidation" - a process where multiple meshes are merged into a single GPU buffer to improve rendering performance. The AggregatedView class consolidates models automatically, which is why you're running into this issue.
While we are not planning to add consolidation support to models generated by the SceneBuilder extension, we will update the extension and make sure that this combination is handled gracefully. In the meantime, if you need to use SceneBuilder models in an AggregatedView app, please unconsolidate your custom models using model.unconsolidate().

Property 'withComponents' does not exist on type 'typeof AgGridModule'

I am using AG Grid in my Angular application and since upgrading from v27 to v28 I get the following error in my app.
Error: src/app/app.module.ts:18:18 - error TS2339: Property 'withComponents' does not exist on type 'typeof AgGridModule'.
I thought this was required when providing your own custom components to AG grid?
Since v28 the AgGridModule no longer needs the .withComponents() method as all user applications will now be using Ivy. The method used to handle registering custom components as EntryComponents but that is no longer required with Ivy and was deprecated by Angular.
So to fix this error make the follow change and your custom components will still work.
- AgGridModule.withComponents([CustomComp]);
+ AgGridModule
See the AG Grid Docs on Angular Compatibility for more details.

What should be done to get around or resolve the PrimeFaces exception requiring the definition of a lazy attribute or one that doesn't result in null?

I am in the progress of upgrading a legacy application from PrimeFaces 6.2 to 11.0.0 (which is the newest available with maven - https://mvnrepository.com/artifact/org.primefaces/primefaces). I have had to make a number of changes, including adding Object as the parameter for RowEditEvent and TreeNode objects (which are now generic) and changing instantiations of DefaultStreamedContent to use .builder(). Now, I am facing the following error whenever I try to run the application and navigate to certain pages:
"javax.faces.FacesException: Unable to automatically determine the lazy attribute. Either define the lazy attribute on the component or make sure the value attribute doesn't resolve to null."
It looks like an exception is being thrown rather than a warning as is noted in the conversation here: https://github.com/primefaces/primefaces/issues/8436. It also looks like it was fixed, but for version 12 (which is not on the maven central repository).
I am wondering what my options are, or what could be done about this. Should I go back to an older version?
As a workaround you could create an application factory which sets the lazy attribute to false.
See: https://primefaces.github.io/primefaces/11_0_0/#/core/globalattributes
Is it a lazy DataTable which uses LazyDataModel? If yes, just set lazy=true, otherwhise set lazy=false

A-Frame: Error when using tracked-controls-webxr

I am using the A-Frame watcher plugin to create the scene, I was creating two entities for left and right tracked-controls-webxr. When I start my dev server from webpack I get this error:
core:a-node:error Failure loading node: TypeError: Cannot set properties of undefined (setting 'buttonStates')
at init (tracked-controls-webxr.js:25:64)
at initComponent (component.js:320:10)
at i.updateProperties (component.js:302:12)
at i.module.exports.Component (component.js:78:8)
at new i (component.js:662:15)
at HTMLElement.value (a-entity.js:332:19)
at HTMLElement.value (a-entity.js:495:12)
at HTMLElement.value (a-entity.js:463:14)
at a-entity.js:249:14
at a-node.js:127:21
Originally I had the two entities as childs to the camera cause that makes sense to me, but the page wouldn't load, I moved them out the page loads but I still get the errors.
afaik the tracked-controls are supposed to set up thetracked-controls-webxr:
tracked-controls sets two components that handles different Web API versions for VR:
tracked-controls-webvr
tracked-controls-webxr
You're getting an error, because tracked-controls-webxr are trying to access tracked-controls and fail - hence Cannot set properties of undefined (setting 'buttonStates').
Try using tracked-controls, or mimic their setup

WriteMessageText() - example code compile error - error CS0103: The name 'Window' does not exist in the current context

I'm trying to create an application using the NFC (proximity) API on Windows Phone 8. When I copy the example code from the documentation, I get the following compile error...
error CS0103: The name 'Window' does not exist in the current context ...
This error is all over the internet and the common solution seems to be that it only works for native (or C++) code. However the documentation says that it works for managed or native code. How do I get the examples to work in my managed code?
In order to gain access to the active Windows.UI.Core.CoreDispatcher object, you simply need to request Windows.UI.Core.CoreWindow.GetForCurrentThread().Dispatcher.
ORIGINAL EXAMPLE CODE
// Write a message to MessageBlock on the UI thread.
private Windows.UI.Core.CoreDispatcher messageDispatcher =
Window.Current.CoreWindow.Dispatcher;
CORRECTED CODE
// Write a message to MessageBlock on the UI thread.
private Windows.UI.Core.CoreDispatcher dispatcher =
Windows.UI.Core.CoreWindow.GetForCurrentThread().Dispatcher;
The one small change makes all the examples work! Enjoy.