Ask / Submit

How to get rid of: TypeError: 'parent' of null @ Util.js:38 ?

asked 2016-06-17 10:14:06 +0200

mobilitio gravatar image

updated 2018-12-03 19:06:45 +0200

Tanghus gravatar image

In my QML/JS app, why I get every time the initial page is opened, a warning is written to the console? (the warning seems harmless anyhow, but...)

 [W] unknown:38 - file:///usr/lib/qt5/qml/Sailfish/Silica/private/Util.js:38: TypeError: Cannot read property 'parent' of null

Looking at the code, the Util page gets a null parent, clear. Why is that?

function findFlickable(item) {
    var parentItem = item.parent

I had the same problem with some other pages, and it seemed to help that I declare all the offending pages in the <application-name.qml> which is invoked right from C++, inside a Component.</application-name.qml>

    id: appWindow

    Component {
        id: anotherPage
        AnotherPage {}

    Component {
        id: firstPage
        FirstPage {}

    initialPage: firstPage

The pages are written in their own QML files, of course. As Pages:

Page {
    id: firstPage

What's the problem, or is this just a charcteristic which just has to be ignored? In my opinion, the errors and warnings should be fixed in applications, or at least there should be a reason to leave them put.

edit retag flag offensive close delete


show code where you using flickables

coderus ( 2016-06-17 17:56:26 +0200 )edit

It's all there:

Almost all pages have a sort of Silica flickable, these have SilicaFlickable:

In particular, there is a SilicaListView inside a SilicaFlickable in it bad? lines 63, 101

Thanks for your interest.

mobilitio ( 2016-06-17 20:21:23 +0200 )edit

try assigning flickable: theFlickable for DialogHeader

coderus ( 2016-06-17 20:33:31 +0200 )edit

I removed the how-to tag, as that is for posts explaining how to solve an issue. And added some useful tags instead.

Tanghus ( 2018-12-03 19:08:24 +0200 )edit

2 Answers

Sort by » oldest newest most voted

answered 2016-06-17 11:26:08 +0200

ApB gravatar image

This is safe to ignore afaik. And you as a dev can't do something about it. Jolla has to fix this.

edit flag offensive delete publish link more


I have now reported this internally as JB#35555 and poked the relevant developers about it. Hopefully it'll be fixed soon. Thanks to the OP for raising the issue.

chris.adams ( 2016-06-21 06:00:07 +0200 )edit

This still exists in

Direc ( 2018-11-29 19:29:55 +0200 )edit

answered 2018-11-29 20:38:58 +0200

Direc gravatar image

updated 2018-12-02 21:52:55 +0200


Please have a look at my question:

I think I developed a fix for the issue.

Edit: Jolla responded to my question, and sadly it looks like Jolla won't silence the error messages since they are actually Qt bugs. That may be fixed in a future Qt version update, but until then, the messages can be safely ignored (or silenced).

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools

1 follower


Asked: 2016-06-17 10:14:06 +0200

Seen: 447 times

Last updated: Dec 02