One might find that while using dynamic allocation, certain devices are not getting used or worse no devices are used.
The service returns an error:
There is no device that matches your criteria
Troubleshooting
Device issues
The device you are trying to find might be unavailable or in use.
Try removing the deviceName capability or simplify it as much as possible and work from there to get the simplest query and work your way from there to get the desired subset of devices needed.
Regex issues
As mentioned in our documentation, using a regular expression on the deviceName capability is possible to further drill down on the type of devices you'd like to see.
This, at times can cause some frustration given Regex's confusing nature.
One way to ensure your regex is doing what is expected is to use a regex verifier.
A good one is:
https://regex101.com/
Here, you can add your regular expression (PCRE flavor is good) and on the test string you can add different names of devices you do and do not want to make sure the query will do what you want.
NOTE: Our regex support is case insensitive. This can be modified on the site by clicking the regex flags and selecting "i" for insensitive.
For the exact name of the device see the device's name on our Live Testing page.
See screenshot below of a regex that will match all iPhone 11 and 12 except the Pro Max versions:
To see this regex in action, see: