Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

QuickApp crashed, Unknown error occurred:


Question

Posted

Hi All,

 

In my own build QuickApp I get the message:

[18.04.2025] [09:46:01] [ERROR] [QUICKAPP1563]: QuickApp crashed

[18.04.2025] [09:46:01] [ERROR] [QUICKAPP1563]: Unknown error occurred:

 

This is happening very random, so the QA kan run for hours with no issues and it can crash minutes aparts.

The error code doesn't give anything hint on what the problem is or which line in the code the problem occurred.

 

Off course I build in my own debug lines, but that doesn't give me a hint.

There is a sleep op 60seconds in the code, It looks like het error occurs during that sleep..

 

Any hints how I can increase the debug level or see some more details in de console, that will be nice.

 

Thanks in advance.

 

5 answers to this question

Recommended Posts

  • 0
Posted

Is it a lot of code? Can you post it here?
or can you make a minimal version of it that also crashes and post it?

People have been reporting this as long as the HC3 been out but there have never been any way to

"corner the bug", come up with code that always have this behavior....

  • 0
  • Inquirer
  • Posted

    The code is to big (700lines)..

     

    I do some HTTP requests to an API like this.

    function QuickApp:Get_WiFi_status(IPAddress)
    net.HTTPClient():request('http://' .. IPAddress .. '/api/1/wifi_status', {
    options = {
    headers = {
    Accept = "application/json"
    },
    method = "GET"
    },
    success = function(response)
    if ((response.status == 200 or response.status == 201))
    then
    if ( DEBUG == "true" )
    then
    print ("API GET wifi_status: " .. response.data)
    end
    Table_WiFi_status = json.decode(response.data)
    self:Get_lifetime(IPAddress)
    else
    error("Error: " .. response.status);
    end
    end,
    error = function(message)
    end
    })
    end

     

    This is the SetTimeout use..

    fibaro.setTimeout( Refresh_Rate*1000, function()
       self:CollectData()
    end)
    • 0
    Posted

    @Nevicare

    Hi.

    I have no idea what your Refresh_Rate parameter is. There will definitely be problems if you are querying a resource where you will process a more complex data structure and you will do it more often than you get responses.

    Furthermore, I do not see a parameter with a suitable timeout for HTTP used elsewhere in the code. See:

    net.HTTPClient({timeout=3000})

    In practice, I have already encountered the need to extend this timeout up to 10 seconds.

     

     

    • 0
    Posted

    No, I don't think that is the problem. One can have 0 in poll-time, the processing in-between will just push the timer into the future. 

    Where in the code do you have the "sleep" ? is it a fibaro.sleep or were you referring to the setTimeout?

    So, it seems to be impossible to come up with a limited example that exhibits these random crashes...

    It makes me believe that the problem is elsewhere. I.e. the overall HC3 system runs low on some resources or have some other 

    temporary issue and crashes QAs randomly that are in some specific state (being it a http requests, a sleep, or whatnots)

     

    • 0
    Posted

    What @jgabsays, you have to narrow your code down to the minimal that triggers the crash. Or add a debug line with every action, so you can try to catch the last action before it crashes. 

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...