Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 4 Support (Qt 6) › Cannot start LiveServer for Felgo projects

Tagged: 

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #25090

    Jan

    With any Felgo projects, even these from examples and tutorials I cannot start Felgo Live Server from QtCreator or standalone.

    If I try run it standalone with project path as argument I got in log:

    Live Server listening on port 42483
    QQmlApplicationEngine failed to load component
    file:///home/czarek/Felgo/Felgo/FelgoLive/qml/Main.qml: No such file or directory

     

    What is going wrong?

     

    BTW: I can run Live Server for projects without Felgo, like pure Qt 6.4 examples.

    My environment: Kubuntu 23.04, Felgo 4.1

    #25091

    Alex
    Felgo Team

    Hi,

    could you post the command that you use to run the Live Server? This path from the log looks odd, as this definitely does not exist in a Felgo installation.

    Does this log already appear when starting the Live Server, and the UI does then not show up, or does this issue appear when trying to connect a Live Client?

    Best,
    Alex

    #25092

    Jan

    In QTCreator I dont even know how Live Server is started.

    As I use sometimes CLion I set up external command like:

    ~/Felgo/Felgo/FelgoLive/FelgoLiveServer ~/Projects/paliwa-mobile (path to executable and path to project folder with CMakeList

    And this command works good till some time (weeks or two ago when I used it last time) and suddenly stopped.

    and now I have in terminal window:

    /home/czarek/Felgo/Felgo/FelgoLive/FelgoLiveServer /home/czarek/Projekty/paliwa-mobile
    qt.gui.imageio: libpng warning: iCCP: known incorrect sRGB profile
    Live Server listening on port 34275
    QQmlApplicationEngine failed to load component
    file:///home/czarek/Felgo/Felgo/FelgoLive/qml/Main.qml: No such file or directory

    Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

     

    And this is just starting Live Server. As process exited so no server UI is opened.

    Without it Live Client is starting, but has nothing to connect to.

    #25093

    Jan

    But… again – it is not issue with CLion only. As I mentioned earlier using QtCreator effect is same, but without any log messages… So, nothing happens in fact after open project or manually starting server – it doesn’t start at all.

    #25094

    Jan

    I know I am maybe the only one who has such problems and it is not blocker for you at Felgo, but I sure you should be interested in fixing this issue before many others meet it.

    So…

    Is there any way to run Live Server with more verbose output?

    For sure I know that path file:///~/Felgo/Felgo/FelgoLive/qml/Main.qml not exists, but what is the way Live Server compose it?

    Why it take own executable path instead of project path?

    #25095

    Alex
    Felgo Team

    Why it take own executable path instead of project path?

    What exactly do you mean here? To start the Felgo Live Server standalone, you only need to pass the path to the root folder of your project, no executable path.

    So e.g. when I fire up my console to start the Live Server standalone, I would do something like this:

    cd C:\Felgo\Felgo4\Felgo\FelgoLive
    
    FelgoLiveServer.exe C:\Git\Felgo4Examples\SomeAwesomeExample

    This should start the Live Server, listening to changes in the defined project folder. When then starting the Live Client (from the Live Server, or using an own Live Client Module app), this project will be transferred and executed at the Live Client.

    Best,
    Alex

    #25097

    Jan

    I think message

    “file:///home/czarek/Felgo/Felgo/FelgoLive/qml/Main.qml: No such file or directory”

    comes because Live Server magically get its executable path home/czarek/Felgo/Felgo/FelgoLive

    and search here for qml/Main.qml from project part.

    It should search in provided project path “~/Projects/paliwa-mobile” as this file is in

    ~/Projects/paliwa-mobile/qml/Main.qml

    I wonder what can cause such problem in my system.

    I had install virtual machine with Kubuntu with Felgo 4 and Live Server starts and works with my project, but I dont see any big differences in environments.

    #25098

    Alex
    Felgo Team

    The Main.qml in question here is not related to the project you are trying to load, from what I see. It is actually the Live Server’s own UI, which is also created in QML, and uses Main.qml as entry point. However this should be actually loaded from resources, and in your case it at least looks like it is trying to load it from the file system instead, and fails.

    So for now, you have a workaround that you can use right? Then we can investigate if we can reproduce this behavior on our end in the meantime.

    Best,
    Alex

    #25105

    Jan

    “So for now, you have a workaround that you can use right?”
    No, I dont have any workaround but run on different system (virtual or second computer)

    #25120

    Jan

    But even on virtual machine, where Live Server starts with my project without problem, Hot Reload is not usable – each save in any QML file causing server crash…

    1 __dynamic_cast 0x7ffff5163cd1
    2 RuntimeLookUp::iterateObjectTree(QObject *, std::function<void (QObject *)>, QSet<QObject *>&) 0x555555b87d63
    3 RuntimeLookUp::iterateObjectTree(QObject *, std::function<void (QObject *)>, QSet<QObject *>&) 0x555555b87fe6
    4 RuntimeLookUp::iterateObjectTree(QObject *, std::function<void (QObject *)>, QSet<QObject *>&) 0x555555b87fe6
    5 RuntimeLookUp::iterateObjectTree(QObject *, std::function<void (QObject *)>, QSet<QObject *>&) 0x555555b87fe6
    6 RuntimeLookUp::iterateObjectTree(QObject *, std::function<void (QObject *)>, QSet<QObject *>&) 0x555555b87fe6
    7 RuntimeLookUp::iterateObjectTree(QObject *, std::function<void (QObject *)>, QSet<QObject *>&) 0x555555b87fe6
    8 RuntimeLookUp::iterateObjectTree(QObject *, std::function<void (QObject *)>, QSet<QObject *>&) 0x555555b87fe6
    9 RuntimeLookUp::iterateObjectTree(QObject *, std::function<void (QObject *)>, QSet<QObject *>&) 0x555555b87fe6
    10 RuntimeLookUp::iterateObjectTree(QObject *, std::function<void (QObject *)>, QSet<QObject *>&) 0x555555b88217
    11 RuntimeLookUp::iterateObjectTree(QObject *, std::function<void (QObject *)>, QSet<QObject *>&) 0x555555b87fe6
    12 RuntimeLookUp::iterateObjectTree(QObject *, std::function<void (QObject *)>, QSet<QObject *>&) 0x555555b87e68
    13 RuntimeLookUp::iterateObjectTree(QObject *, std::function<void (QObject *)>, QSet<QObject *>&) 0x555555b87e68
    14 RuntimeLookUp::iterateObjectTree(QObject *, std::function<void (QObject *)>, QSet<QObject *>&) 0x555555b87fe6
    15 RuntimeLookUp::iterateObjectTree(QObject *, std::function<void (QObject *)>, QSet<QObject *>&) 0x555555b87fe6
    16 RuntimeLookUp::iterateObjectTree(QObject *, std::function<void (QObject *)>, QSet<QObject *>&) 0x555555b87fe6
    17 RuntimeLookUp::iterateObjectTree(QObject *, std::function<void (QObject *)>, QSet<QObject *>&) 0x555555b87fe6
    18 RuntimeLookUp::iterateObjectTree(QObject *, std::function<void (QObject *)>, QSet<QObject *>&) 0x555555b87fe6
    19 RuntimeLookUp::iterateObjectTree(QObject *, std::function<void (QObject *)>, QSet<QObject *>&) 0x555555b8807a
    20 RuntimeLookUp::iterateObjectTree(QObject *, std::function<void (QObject *)>) 0x555555b888c9
    … <Więcej>

    #25125

    Jan

    I have found what problem is, but still dont know how to fix it in QtCreator.

    Problem is working path to FLS.

    When I set it in Clion or call FLS in terminal from where it is located – all works fine.

    As I am not able to set it in QtCreator (or I only dont know how to do it) so FLS not starts from QtCreator.

    #25126

    Alex
    Felgo Team

    The path that Qt Creater oses to start the Live Server when clicking the Live Run button in Qt Creator, is configured in the Felgo Live Qt Creator Plugin (e.g. on Windows: <path to Felgo installation>/Tools/QtCreator/lib/qtcreator/plugins/FelgoLivePlugin.dll) and can’t be changed. It points to <path to Felgo installation>/Felgo/FelgoLive/FelgoLiveServer.exe, so the same path that you would also use to manually start the Live Server. It passes the path the currently open project in Qt Creator as argument.

     

    each save in any QML file causing server crash

    Is actually the Live Server (monitoring source files, sends updates to Live Client) crashing or rather the Live Client (executing the project)? A potential reason for the Live Server crashing would be very large amounts of log output that could actually cause a freeze of the Live Server.

    #25129

    Jan
    1.  QtCreator – LiveServer try to start, but failing because of wrong working directory, I cant change parameters for LiveServer execution
      in QtCreator
      In CLion or command line – LiveServer starts and works if working directory is same as binary location
    2. Live Clint is crashing and I have found source of problem – using of WebView component.
      Once I “hide” its usage by lazy loading by Qt.createQmlObject issue was solved.
Viewing 13 posts - 1 through 13 (of 13 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded