Custom appconnect extension freezes design view

As you can see in the video, when i add my custom extension to the page the design view completely freezes. I can't refresh either.

This has been happening for months. The extension works fine and my actual browser loads the page fine.

I guess there's something wrong with the code that is perhaps looping / crashing the preview. But how can I debug this @patrick ?

It also seems to make my CPU go crazy and overheat.
Please help

Bump. Any input that I can atleast debug it?

Are you sure the extension is causing the issue?
Have you tried it on another page?

Yes, I'm sure because:

  1. Another dev on the team has the same issue with just the pages the extension is on.
  2. If I comment out the line that loads the extension then everything works fine.
  3. I tried on different pages, whatever page I add the extension to it the design view freezes

Edit: trying to get a bug report but both instructions here:

are not working.
There's no ~/Library/Application Support/Wappler/chrome_debug.log

@George

I know you already said that all works fine on browser..
But have you recorded some performance?
Firefox is better than chrome for that..

Also, there's another log besides the output?
Restart with logging maybe shows you something else

You mean the one from my just edited previous message?
I can't seem to generate that log sadly.

Will try firefox' performance tools now to see if they helps uncover something.

That's strange, are you in beta? Same behavior on stable 6.8.0?

Will try to replicate it later and see if there's something wrong after some test

Thanks to a now removed comment I found the log file in library/Logs/wappler/wappler.log

These are the contents.
redacted wappler logs.zip (5.8 KB)

These look relevant, but not sure what's causing it.

Error: Command appStructure got a timeout.
 Error: Command selectNode got a timeout.

Oh and yes on the latest beta but this bug was also on stable.

Lol, realised mac may be different so thought i may cause confusion and removed comment. Maybe shouldn't have. :grinning:

What about renaming all id's? Maybe something is causing a loop...

Same happens here and doing a performance on firefox:

3837 samples in 7 seconds, maybe waiting something that never comes?

hmm I can try that, what do you have in mind? Renaming ID's of the editor (the extension is a tiptap editor)

I'm curious what you did here exactly, you also managed to crash your design view? How did you do that?

Thanks for trying to help btw!

I just recorded on firefox
You can inspect all by going to - firefox -> performance -> record..

Yes, first of all I thought that the issue could be related to the 40K lines of the original tiptap file, but after some test, found the issue comes with the custom js added, I think the lines are from 39636 to 40549 on the /public/js/tiptap/tiptap-bundle.js
So probably something wrong is happening between those lines..
Maybe causing a loop, but not an expert here, so hard to debug.

Ah did you use https://www.npmjs.com/package/@brightyard/wappler_tiptap?activeTab=code ?
I've got my own version that's based on the initial version Keith made.

But maybe @kfawcett , do you know how to fix this freezing of the design view?

Otherwise I think we really need some help from the team here... as it works fine.
Please @patrick , any way that I can debug what happens in Wappler's built-in browser? Maybe the console will tell me more... if I can access that?

Hey guys, that's strange. I do not use design view in Wappler because it won't render my code properly, so I haven't experienced this issue. I know @karh forked the extension and what I have now is a lot different than what is available on npm.

@franse, are you saying you're experiencing issues at runtime in a browser?

Hello @kfawcett

Yes, exactly..
Adding the tiptap extension from npm freezes the wappler design view, and there's a strange behavior on external browser.

To be clear: I can't see any issue on the external browser, but running a performance test throw there's something waiting on a loop, maybe a function? I'm not entirely sure

@George since Wappler is based on Electron, can we make something like this and get more info?

--remote-debugging-port=port
Enables remote debugging over HTTP on the specified port.

Bump