Premium support for our pure JavaScript UI components


Post by jandresampaio »

Yes, it doesn't have any schedulerInstance.destroy()...it's still using route reuse strategy...

ngOnDestroy without destroying scheduler instance.PNG
ngOnDestroy without destroying scheduler instance.PNG (119.44 KiB) Viewed 1936 times

Not sure if it helps but, your example (advanced) does not have assignments.
Notice that my example has assignments and the error occurs on assignmentsData.


Post by alex.l »

Hi jandresampaio,

Unfortunately I have an error in prod version of your app after rebuild, that reported here: https://github.com/angular/angular/issues/38436

I am sorry, but you checked wrong component. This component contains only log function in ngOnDestroy() and uses bryntum scheduler wrapper inside. The next step will be call ngOnDestroy() in the scheduler wrapper. I will attach a screenshot with a breakpoint in it.

I guess you are confused because the RouteStrategy is still in the project. But it has been removed from "providers []" array in app.module.ts. I've attached a new version without this file and with assignments[] data set, as you suggested in your last post. Please review it, it still works.

My idea that I tried to check in your app is to remove all variables that contains scheduler in more global scope. This looks like angular's bug to me.
Please, review fresh app version I've attached. I also copied all your configs into that app.

I will be glad to hear from you any updated regarding this problem.

All best,
Alex

Attachments
advanced-10_new.zip
(3.65 MiB) Downloaded 149 times
Screenshot 2020-10-29 at 13.43.31.png
Screenshot 2020-10-29 at 13.43.31.png (326.96 KiB) Viewed 1931 times

All the best,
Alex


Post by jandresampaio »

I am sorry, but you checked wrong component. This component contains only log function in ngOnDestroy() and uses bryntum scheduler wrapper inside. The next step will be call ngOnDestroy() in the scheduler wrapper. I will attach a screenshot with a breakpoint in it.

Sorry, completely missed that you were using the wrapper component in your example.

My guess is that you are using the wrapper built with Angular 8.
What version of Angular are you using on the wrapper component? The example I've sent at the beginning of the thread was built using the wrapper with Angular 10, and I got those errors.


Post by alex.l »

Hi jandresampaio,

I copied all your configs, angular version too. It uses angular 10. You can check that in package.json.

All best,
Alex

All the best,
Alex


Post by jandresampaio »

No, the package.json is the one from the this particular example (angular 8), not from the wrapper (shared folder). The wrapper is already built in other folder.

I can confirm that if building the wrapper with Angular 8, the first example I've uploaded works, i.e, navigating between routes.
Building the wrapper with Angular 10 returns the first error I've mentioned.


Post by alex.l »

Hi jandresampaio,

Glad to hear we found the cause.
We recommend you to use our wrappers built with working versions. This bug sounds like Angular optimization/minification issue. We don't see any benefits in upgrading our wrappers to Angular 10 now, but you could try to play with build optimization flags to find a workaround if you really need it upgraded.

All best,
Alex

All the best,
Alex


Post by jandresampaio »

Hi Alex,

Obviously, we're not going to change our application architecture and maintain an additional project because Bryntum is not compatible Angular 10 build. None of our other dozens of packages have this issue.
Are you going to investigate this?

Thank you.


Post by alex.l »

Could you please send us our package after your edits in package.json, tsconfig.json, angular.json to make it Angular 10? We will check that and fix for you.

All the best,
Alex


Post by jandresampaio »

Hi Alex,

Of course, here it is.

_shared.zip
(2.72 MiB) Downloaded 180 times

Post by alex.l »

Obviously, we're not going to change our application architecture and maintain an additional project

I think I was not clear enough in my message. I just meant you don't really need to rebuild all your packages to angular-10 to use them with your Angular-10 application. Same for bryntum packages. It's still compatible since it's built with any version from angular 7 to angular 10 according to Angular documentations.
Anyway, we were able to update it for you.
I used your _shared.zip and my example together and checked all once again on 2 different machines.
It's working stable in both machines. The only thing I saw again and need to aware you about, it's an error I reported before that I saw in your app too: https://github.com/angular/angular/issues/38436
It's Angular bug which is not fixed yet (possibly happens only for version 10), but we found a workaround: if you have this error after you launch prod version (the result of npm run build command), just call npm run build once again without removing anything. After the second build the error will be fixed. That's strange, but this is how it works. It's definitely a bug with angular build optimization process, same I think about the problem you reported.

The next steps that we could do: check the zip attached. You will find 2 folders inside: advanced-10 and _shared. Unzip them into your angular directory as you did before.
Goto _shared and run npm i inside (check package.json to make sure it uses angular 10).
Goto advanced-10 and run npm i (check package.json to make sure it uses angular 10) and after that npm run build to build prod version.
After that try to open the prod version of the app (it will be in dist/angular-8 subfolder).
If you see "selectors of null" error - this is that I told you about, check the info above - it may be easily fixed.

All works like a charm. Please, try to reproduce your problem once again. If you will see that, please zip all that you can and send to us, with steps to reproduce and all details about your environment, version of bryntum scheduler, your browser, your OS. We really need to find the cause.

All best,
Alex

Attachments
angular-10-working.zip
(3.63 MiB) Downloaded 164 times

All the best,
Alex


Post Reply