Unusual Shortcuts Error: Expected 147875 to be of class NSNumber but got NSTaggedPointerString

Hey everyone!

So, I have a pretty complex Workflow I built that among other things gets an iTunes song ID, searches for that ID using the “Search iTunes Store” action, and adds it to a playlist.

However, recently it has stopped working with a really bizarre error. I get the product ID and it seems like a reasonable value (1418211925 for example) but then I get an error from Shortcuts that says “Expected 147875 to be of class NSNumber but got NSTaggedPointerString” (screenshot below). I believe the error is coming when trying to access dictionary value.

The number in the error does not match the value that is shown if I quick look the value returned either.

I have created a simple example automation that creates the error at this link:

https://www.icloud.com/shortcuts/55bf573447614e70a95f981897d1118d

Any help would be appreciated!

-Jeremy

I can’t tell, are you using a magic variable, or just passing the object along? If not, I would first try a magic variable.

I am using a magic variable.

Curious. The error only appears when searching by Product ID.
Keeping the same flow, but changing to ‘John’ and searching by name works fine.

I say it’s a bug in how the search is implemented, that it is sending the wrong GET request to the store and gets that error returned.
Just a guess, though.

Yeah, given how easy it was to trigger, I am assuming the same. I have submitted a Radar to Apple. We’ll see.

Have you tried selecting it and changing the type from text to number?

Same error. I think @GraemeS has it right that the error is coming back via the API. I have never seen what is clearly an Objective-C error pop up before.

Works for me on beta build 2.1 (710). No errors.

Oh, right, that is probably why I am not seeing the issue either. Doh!

Ok, well that is good to know. At least it will be fixed when that is released. (Or I can try to get into the beta I guess)