-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError fix for Imagemagick Cloud Vision API tutorial #490
Conversation
Incorrect version dependency for @google-cloud/vision 0.12. Should be 0.11.4. This results in a critical TypeError for ImageMagik tutorial. This fix allows index.js to be backwards compatible for function calls against vision API 0.11.4 -- vision.detectSafeSearch. Results in TypeError: vision.detectSafeSearch is not a function. Cloud Vision API v0.12 has deprecated detectSafeSearch() in favor of safeSearchDetection(). Logs reference on Cloud Function: blurOffensiveImages "TypeError: vision.detectSafeSearch is not a function at exports.blurOffensiveImages (/user_code/index.js:44:17) at /var/tmp/worker/worker.js:659:26 at process._tickDomainCallback (internal/process/next_tick.js:135:7)"
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
Signed! |
CLAs look good, thanks! |
Greetings! It looks like we updated this in another commit at some point. Thank you for the PR! |
Codecov Report
@@ Coverage Diff @@
## master #490 +/- ##
=======================================
Coverage 48.52% 48.52%
=======================================
Files 1 1
Lines 68 68
=======================================
Hits 33 33
Misses 35 35 Continue to review full report at Codecov.
|
🤖 I have created a release \*beep\* \*boop\* --- ## [2.7.0](https://www.github.com/googleapis/nodejs-kms/compare/v2.6.0...v2.7.0) (2021-08-23) ### Features * turns on self-signed JWT feature flag ([#490](https://www.github.com/googleapis/nodejs-kms/issues/490)) ([3db7ee5](https://www.github.com/googleapis/nodejs-kms/commit/3db7ee57cbf22a27f639df150c4a408107dfcde6)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
🤖 I have created a release \*beep\* \*boop\* --- ## [2.7.0](https://www.github.com/googleapis/nodejs-kms/compare/v2.6.0...v2.7.0) (2021-08-23) ### Features * turns on self-signed JWT feature flag ([#490](https://www.github.com/googleapis/nodejs-kms/issues/490)) ([3db7ee5](https://www.github.com/googleapis/nodejs-kms/commit/3db7ee57cbf22a27f639df150c4a408107dfcde6)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
* updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Incorrect version dependency for @google-cloud/vision 0.12. Should be 0.11.4. This results in a critical TypeError for ImageMagik tutorial.
This fix allows index.js to be backwards compatible for function calls against vision API 0.11.4 -- vision.detectSafeSearch. Results in TypeError: vision.detectSafeSearch is not a function.
Cloud Vision API v0.12 has deprecated detectSafeSearch() in favor of safeSearchDetection().
Logs reference on Cloud Function: blurOffensiveImages
"TypeError: vision.detectSafeSearch is not a function at exports.blurOffensiveImages (/user_code/index.js:44:17) at /var/tmp/worker/worker.js:659:26 at process._tickDomainCallback (internal/process/next_tick.js:135:7)"