All Apps and Add-ons

Compatible with Splunk_TA_google-cloudplatform ?

jypyking
Explorer

Hi,

I've installed this add-on on a HF that also have the Splunk_TA_google-cloudplatform add-on. For some reason it looks like this IA is trying to use the oauth2client lib from the Splunk_TA_google-cloudplatform instead of the one from its own folder and fail.
I tried adding the _init_.py file in "/opt/splunk/etc/apps/IA-GSuiteForSplunk/bin" but it doesn't change anything.
Any clue ?
Thanks.

Traceback (most recent call last):
File "/opt/splunk/bin/rest_handler.py", line 79, in
print splunk.rest.dispatch(**params)
File "/opt/splunk/lib/python2.7/site-packages/splunk/rest/init.py", line 149, in dispatch
module = import('splunk.rest.external.%s' % parts[0], None, None, parts[0])
File "/opt/splunk/etc/apps/IA-GSuiteForSplunk/bin/ga_authorize.py", line 14, in
from oauth2client.client import OAuth2WebServerFlow
File "/opt/splunk/etc/apps/Splunk_TA_google-cloudplatform/bin/oauth2client/client.py", line 46, in
from oauth2client import util
ImportError: cannot import name util

0 Karma
1 Solution

alacercogitatus
SplunkTrust
SplunkTrust

Due to App Precedence, Splunk will pull the library from the first path location it finds. This is an issue with the way core Splunk implements the framework. A solution could be to see if Splunk_TA_googlecloudplatform works with the oauth2client that ships with G Suite, and replace the Splunk one. You can also move the util folder from Splunk_TA_gcp and stick it in the GSuite/bin folder so that the import works correctly.

View solution in original post

0 Karma

jypyking
Explorer

Thanks! Actually copying the util.py file from the cloudplatform app to the Gsuite app fixed it 🙂

0 Karma

alacercogitatus
SplunkTrust
SplunkTrust

Due to App Precedence, Splunk will pull the library from the first path location it finds. This is an issue with the way core Splunk implements the framework. A solution could be to see if Splunk_TA_googlecloudplatform works with the oauth2client that ships with G Suite, and replace the Splunk one. You can also move the util folder from Splunk_TA_gcp and stick it in the GSuite/bin folder so that the import works correctly.

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...