macOS Catalina: problem with sample code

1205
8
Jump to solution
07-10-2020 10:54 AM
ChristopherSwingley
New Contributor II

I recently upgraded the operating system on my laptop to Catalina (10.15.5), XCode (11.5) and the latest QT (5.15.0), QT Creator (4.12.4), and the 100.8 version SDK. When I build, and then run the Features/FeatureLayer_GeoPackage code example from the git repository I get this error at run time:

qrc:/Samples/Features/FeatureLayer_GeoPackage/FeatureLayer_GeoPackage.qml:48: TypeError: Property 'createWgs84' of object [object Object] is not a function

The same code works fine on my Linux desktop at work, and presumably elsewhere. The kit I'm using has qmake at ~/Qt/5.15.0/clang_64/bin/qmake and CMake from /usr/local/bin/cmake (version 3.17.3), which was installed using homebrew.

I tried uninstalling all versions of the SDK, removing all the configuration files from ~/.config/EsriRuntimeQt and ~/.config/QtProject, then reinstalling the SDK, but I get the same issue. Can anyone suggest a path forward? Happy to provide more information if it would help.

Chris

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
JamesBallard1
Esri Regular Contributor

Hi Christopher Swingley‌,

    You've not done anything wrong. There is a breaking change with Qt 5.15 with how our QML singletons are registered. We've accounted for this already with our upcoming 100.9 release, but it will involve some code changes.

We've already changed this code in that sample you're using in our working branch for that sample:

arcgis-runtime-samples-qt/FeatureLayer_GeoPackage.qml at v.next · Esri/arcgis-runtime-samples-qt · G... 

You can't use that solution yet until 100.9 is released, but you can chance the code in the sample locally as follows:

ViewpointCenter {
    Point {
        y: 39.7294
        x: -104.8319
        spatialReference: SpatialReference {
            wkid: 4326
        }
    }
    targetScale: 200000
}

SpatialReference will be problematic, either the createWebMercator or createWgs84 methods.

Your current options are:

 * Don't use Qt 5.15 now, use 5.14.x or any older version for now.

 * Replace the createWgs84 method call in that sample you're using with the declared spatial reference object as shown above. 

Your best bet for now is to use an older version of Qt if possible in the interim until 100.9 is released and we have a nice code migration option for you.

View solution in original post

0 Kudos
8 Replies
JamesBallard1
Esri Regular Contributor

Hi Christopher Swingley‌,

    You've not done anything wrong. There is a breaking change with Qt 5.15 with how our QML singletons are registered. We've accounted for this already with our upcoming 100.9 release, but it will involve some code changes.

We've already changed this code in that sample you're using in our working branch for that sample:

arcgis-runtime-samples-qt/FeatureLayer_GeoPackage.qml at v.next · Esri/arcgis-runtime-samples-qt · G... 

You can't use that solution yet until 100.9 is released, but you can chance the code in the sample locally as follows:

ViewpointCenter {
    Point {
        y: 39.7294
        x: -104.8319
        spatialReference: SpatialReference {
            wkid: 4326
        }
    }
    targetScale: 200000
}

SpatialReference will be problematic, either the createWebMercator or createWgs84 methods.

Your current options are:

 * Don't use Qt 5.15 now, use 5.14.x or any older version for now.

 * Replace the createWgs84 method call in that sample you're using with the declared spatial reference object as shown above. 

Your best bet for now is to use an older version of Qt if possible in the interim until 100.9 is released and we have a nice code migration option for you.

0 Kudos
ChristopherSwingley
New Contributor II

Thanks for the speedy reply! I did look at the system requirements and I don't recall seeing any warning there about the latest QT version. I'll install 5.14.x and wait for 100.9.

JamesBallard1
Esri Regular Contributor

You are right, there is no mention of this in the system requirements for 100.8. Apologies for that. I'll coordinate with the team and see how we can inform our users about this better.

0 Kudos
ChristopherSwingley
New Contributor II

James Ballard: Any hints on when 100.9 might be released (or if there's a devel track where I could download release candates/etc.)? It turns out that there are problems with the serialnmea position plugin in the previous version of Qt (5.14.2) that appear to have been fixed in 5.15.0. So I'm in a bit of a bind, needing both the ESRI SDK and the latest Qt. Thanks!

0 Kudos
JamesBallard1
Esri Regular Contributor

Christopher Swingley‌,

   We are wrapping up the 100.9 release right now. While I cannot promise any particular date, I can say it should be before the end of August 2020. That is subject to change.

Unfortunately there is no early access for 100.9 right now.

Hopefully we can get things finished up and out the door soon for you. We're working hard to make it happen!

Our team ran into a similar problem with the serialnmea position plugin, but that problem also happens with Qt 5.15.0. Hopefully this isn't the one you're referring to, since as far as I know it is still a problem.

[QTBUG-85636] [Regression] Qml Positioning with nmea source file does not work - Qt Bug Tracker 

0 Kudos
ChristopherSwingley
New Contributor II

James Ballard Thanks for the info on 100.9. I didn't see that Qt bug, but I did find one that was affecting 5.14.2 [QTBUG-82819] serialnmea plugin does not work with external serial device - Qt Bug Tracker , but the patch in this issue was applied for 5.15.0 and fixes it from what I can tell. I couldn't test it with the ESRI SDK, obviously, but the PositionSource with serialnmea does work with 5.15.0 and didn't with 5.14.2. I also applied the same patch to the serialnmea code for 5.14.2, and that also works. So I think I have a solution for 5.14.2/100.8 (use the patch from QTBUG-82819), and hopefully 5.15.0 (already patched) will work with 100.9 when it comes out.

What was the serialnmea issue you found with 5.15.0 and 100.9-dev?

0 Kudos
JamesBallard1
Esri Regular Contributor

>What was the serialnmea issue you found with 5.15.0 and 100.9-dev?

It was the one I mentioned, QTBUG-85636. We were using that functionality in some of our automated tests and they stopped working due to that problem when we upgraded to Qt 5.15.

0 Kudos
ChristopherSwingley
New Contributor II

James Ballard Gotcha, thanks. That bug isn't specifically related to the serialnmea plugin, just the functionality where you can test a PositionSource using a file containing NMEA strings, so it doesn't affect my use case (a hardware GPS unit transmitting NMEA). There was a point where I was using a serial port redirector and a TCP socket as a nmeaSource (nmeaSource: "socket://127.0.0.1:7777", for example), but serialnmea works much better and is designed for this.

0 Kudos