Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Unable to scan QR or BarCode due to script error



You are using the out-of-the-box (OOTB) script called from an OnClick of a button. When you click the button, you get the below error.

Action 'Undefined' Failed.

Error Messages

Action 'Undefined' Failed.

Steps to Reproduce

1) Use
the script to be called from an OnClick of a button.
2) Click the button.

Root Cause

The root cause of this problem is defect/misconfiguration in the PRPC operating environment.

The pyIncludeMobileQRScan When rule present in the “Pega-Mobile’ ruleset was always returning “False”. This When rule is referred to in pyMobile HTML where the “pzmobile_qrscan.js” is included conditionally based the When rule.


This issue is resolved through the following local change:
Specialize the “pyIncludeMobileQRScan” When rule in your application and make it return true.
Suggest Edit

Published January 31, 2016 - Updated October 8, 2020

Did you find this content helpful? Yes No

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us