Topic locked

Intermittent Invalid Key Error

April 24, 2015 - 8:48am #1

Vuforia SDK Version: 4.0 -
Description with steps to reproduce:

I am seeing an occassional error:


Invalid Key used. Please make sure you are using a valid Vuforia App Key


After this error, Vuforia fails to start, and the app is left with a blank screen. This happens perhaps 1 out of 30 times activating Vuforia.


Is the app trying to reach the network to verify the key? Is there any way to prevent this in a production app?


Interestingly if I put my phone in airplane mode, Vuforia starts with no issues.


I am using Vuforia 4.0 in a native iPhone app.

Development OS (Mac OS X, Windows, Linux): OS X 10.103 -
Mobile OS and Version: iOS 8.3 -
Mobile Device Manufacturer and Model name: Apple iPhone 6+ -
Do the Vuforia Sample Applications show the same behavior?:

Intermittent Invalid Key Error

May 18, 2015 - 6:33pm #6

Thanks for sharing your results and workaround.

Intermittent Invalid Key Error

May 15, 2015 - 3:53pm #5

Seems the issue was caused by setInitParameters being called every time the view loaded (which I believe is what happens in the sample app as well). A new SampleAppSession instance was being created every time I loaded the view as well, without being deallocated.

I switched to using a sharedInstance of SampleAppSession and set a flag to only call setInitParameters when it is first loaded. Seems to fix the issue.

Intermittent Invalid Key Error

April 28, 2015 - 10:05pm #4

If the app's private data cache is cleared as a result of reloading the app or calls to erase the app's settings, then this could be factor.

Intermittent Invalid Key Error

April 28, 2015 - 10:39am #3
1. I'll try to reproduce using that sample. Like I said it's intermittent so may not be able to.
2. Do you mean like NSURLCache or something else? The app doesn't do any networking at all actually, so besides whatever networking Vuforia is doing, I don't touch any networking stuff.

Intermittent Invalid Key Error

April 27, 2015 - 12:58pm #2

A couple of questions:

  1. Can you reproduce this behavior with our ImageTargets 4.0.105 sample app?
  2. Is the app's cache ever being cleared during your testing?


Topic locked