I wrote an editor type app with three pages, app starts and publishes withtout problems in the command line.
However, when the app is running, the editor in the web browser (Chrome) does not load (saying Fout
Laden van editor mislukt.) and there is no error given in the command line running vitkor-cli start.
Obviously I tried to see if it happens because of a specific part of the code so I commented out the second and third page in the parametrisation and the related callbacks in the controller. Upon reloading, the first page works like a charm (also when published). I then uncommennted everything, reloaded the website and this time all three pages were there without an issue.
This has been the way I’ve been developing the app - first start with the first page only and then add the second two pages. This trick does not work for publishing (unsurprisingly).
I would really like to publish the whole app - can you give me some understanding of what is happening? Any tips on how to work around this / solve ti would be appreciated.
Welkom to the forum, I will try to help you and solve your problem.
I am a bit confused here and have some questions:
- When you run
viktor-cli.exe start, does the complete app work properly in your development workspace?
- Are there any callbacks in the parametrization that rely on information being present in the workspace or needs to access files on the local file system of your computer.
- to what app/workspace did you publish the app?
- what SDK version are you using?
sorry for the very late response, i was off last week.
- The app did not work with
viktor-cli.exe start as it was. I could get it to work by first starting it with two of the three pages commented out, in which case it worked. After uncommenting, the app reloaded and it worked with all three pages. It is indeed confusing.
- It does access files but I handle paths with pathlib, this has worked for me before. The first page loads files.
Either way, by trying all the things I found out that the issue was a callback of an OptionField, when I replaced it with a fixed list and then a faster callback function, it worked.
That being said, the issue was resolved by replacing the callback. The old function did a bit more processing than the new one, but I’m not sure if that’s what caused the issue.
Thank you for your reply - it made me double check all the file access.