Authenticating Google Cloud Storage in R Studio - r

I know a similar question has been asked (link), but the response didn't work for me.
TLDR: I keep running into errors when trying to authenticate Google Cloud Storage in RStudio. I'm not sure what is going wrong and would love advice.
I have downloaded both the GCS_AUTH_FILE (created a service account with service admin privileges'--downloaded the key associated with the service account) and also downloaded GAR_CLIENT_WEB_JSON by creating a OAuth 2.0 Client ID and downloading that associated JSON file.
I've tried authenticating my Google Cloud Storage in several ways and hit different errors.
Way 1-automatic setup:
gcs_setup()
Then I select any one of the options, and get the error: Error in if (file.exists(local_file)) { : argument is of length zero And that error happens no matter which of the three options I select.
Way 2 - basic, following manual setup instructions from the package:
Sys.setenv("GCS_DEFAULT_BUCKET" = "my-default-bucket",
"GCS_AUTH_FILE" = "/fullpath/to/service-auth.json")
gcs_auth()
In this case, GCS_AUTH_FILE is the file that I mentioned at the beginning of this post, and the GCS_DEFAULT_BUCKET is the name of the bucket. When I run the first line, it seems to be working (nothing goes awry and it runs just fine), but when I run gcs_auth() I get taken to a web browser page that states:
"Authorization Error
Error 400: invalid_request
Missing required parameter: client_id"
Way 3: Following the method from the post that I linked above
This way involves manually setting the .Renviron file w/ the GCS_AUTH_FILE and GAR__CLIENT_WEB_JSON locations, and then running gar_auth(). And yet again, I get the exact same error as in Way 2.
Any ideas about what could be going wrong? Thanks for your help. I wasn't sure how to put in totally reproducible code in this case, so if there is a way I should do that, please let me know.

Related

Artifactory Users Management not loading

I'm trying to open the Artifactory Users Management page, following the Admin->Security->Users tab.
Then I'm getting the following error:
Any idea of what might be causing it? Also, which log I can check this? Couldn't find anything yet.
The server error generally indicates there is problem fetching the user details from Artifactory. This can happen due to any of the following reasons:
when you have a high volume of users and the request is timing out.
There is a chance that you might have created a username with a
special character which is not allowed (using the REST method or some
other method)
There is an issue with the backend database
And the best place to troubleshoot is to first check the request log a good valid entry looks like below:
20200715164402|104|REQUEST|165.225.104.49|admin|GET|/ui/users|HTTP/1.1|200|0
Next check the artifactory.log file for java stack or check catalina.out under tomcat/logs directory.

DialogFlow "Webhook call failed. Error: UNKNOWN."

I have a DialogFlow setup using a firebase function for fulfillments.
I attempted to add two regions to .region() in my index.js file. This led to me deleting my existing firebase function (which had been running on "us-central-1") and adding two new ones for the newly added regions.
After doing so, my dialogflow setup completely fails to do fulfillments. Instead, i get "Webhook call failed. Error: UNKNOWN" with no other details. I tried removing .region() in my index.js, thereby creating a new firebase function similar to the original, but without luck.
I have also tried to add my fulfillment code directly in the inline editor, but this does not work either.
I am at a loss for what to do here. Has anyone experienced similar issues or perhaps know a fix? Please note that the setup worked completely fine prior to adding .region() and deleting the existing firebase function.
NOTE: I am getting a weird error when deploying through the inline editor: "Permission 'cloudfunctions.functions.SetIamPolicy' denied on resource '(my resource)' (or resource may not exist)."
Regarding the following error:
Permission 'cloudfunctions.functions.SetIamPolicy' denied on resource '(my resource)' (or resource may not exist).
I also encountered this when I deleted the function and tried to redeploy it.
I discovered that this occurs when the user (i.e. you) deploying the function does not have sufficient permissions to set IAM policies. In my case, the project was owned by another user whilst I had limited access. After being given owner access, although you likely only need permissions to manage IAM, the function deploys without any errors.
Although you moved the location of the function, you don't mention that you changed the URL for the webhook in Dialogflow to reflect this new location. The URL for Firebase Cloud Functions include the region where the function runs, so if you change the region, you also need to change the fulfillment URL.

How do I get past this error in the Firebase console when adding a new app? "There was an unknown error while processing the request. Try again."

I'm getting this error after I try to add a new app and click 'Register App':
"There was an unknown error while processing the request. Try again."
I've looked at these and they have the same problem but didn't have solutions that worked:
Can't create Firebase project - There was an unknown error while processing the request. Try again
GCM - Getting Error message "There was an unknown error while processing the request. Try again." when creating new project
Firebase: There was an unknown error while processing the request. Try again.
I'm not using multiple Google accounts. I've tried signing out and in again, tried changing the package name, and the Firebase status page doesn't show any outages.
I had the same problem, After a long research fond that it was been OAuth 2.0 Client Id limit. In order to resolve, I have deleted all OAuth 2.0 Client IDs from Google cloud console, then try again. It works fine for me.
Steps to remove OAuth 2.0 Client IDs :
Open 'https://console.cloud.google.com/'
Select your project from the top navbar
Select APIs & Services from Left Side panel
Select Credentials in the left panel
Go to OAuth 2.0 Client IDs
Select all unused Entries (!Carefully)
Click on delete on the top bar
Done, go to firebase console try again
It may solve your problem!!
Have you tried changing your package name? I'd same issue,that was resolved by changing package name. As Firebase saves deleted package names as well.
You might reached number of OAuth 2.0 client IDs limits. There is a limit of around 30 client IDs that can be created within a single project.
Make sure you sign out all your google accounts and sign in with the account for your specific project. I'm normally signed in to 3 or 4 accounts and ran into this error issue. Did as I mentioned and it worked.
The operation has failed (Reason: [object ProgressEvent])
I am getting the above-mentioned error while creating a new project. This got resolved by logging out and logging in again

Why is Bing Custom Search API throwing an error when I make a call through node-js?

I was using Bing Custom Search API for the past week with no problems thanks to the free trial, but today, I tried upgrading to the S1 plan, since the API was sending error messages. I tried regenerating the key as well, but despite doing both of these things, I was still getting errors and unable to use the API.
However, I was able to make calls using: https://www.customsearch.ai/applications, where I was able to use my API key to test endpoints and get the results I expected. What baffles me is that my nodejs code which hasn't been modified aside from the subscription key should still work with the upgraded plan, but it doesn't.
I should be able to help here. Let us do little bit of troubleshooting once:
First go to https://www.customsearch.ai/applications -> click on your instance name ->Click on "Production" tab on top -> Try making API call on this page by providing Query and Subscription key you got. If this works, go to the next step.
On the page mentioned above you would have seen Custom Configuration ID and Subscription Key. Make sure those two are same in your node.js code. Ideally this should work.
If it still doesn't work, please share your error code so that I can get better understanding of the error you are getting.

Getting "Resource not found error" while using Azure File Sync

Facing a very strange issue.
Following this guide https://azure.microsoft.com/en-in/documentation/articles/app-service-mobile-xamarin-forms-blob-storage/ to implement File Sync in Xamarin Forms app.
The Get method in my service (GetUser, default get method in App service controller) is being called thrice & on the 3rd iteration it gives me a 404 resource not found error. First 2 iterations work fine.
This is the client call
await userTable.PullAsync(
null,
userTable.Where(x => x.Email == userEmail), false, new System.Threading.CancellationToken(), null);
If I remove the following line,
// Initialize file sync
this.client.InitializeFileSyncContext(new TodoItemFileSyncHandler(this), store);
then the code works just fine, without any errors.
I will need some time doing a sample project, meanwhile if anyone can shed some light, it will be of help.
Thanks
This won't be an answer, because there isn't enough information to go on. When you get a 404, it's because the backend returned a 404. The ideal situation is:
Turn on Diagnostic Logging in the Azure Portal for your backend
Use Fiddler to monitor the requests
When the request causes a 404, look at what is actually happening
If you are using an ASP.NET backend (and I'm assuming you are because all the File tutorials use ASP.NET), then you can set a breakpoint on the appropriate method in the backend and follow it through. You will need to deploy a debug version of your code.
this is sorted now, eventually I had to give it what it was asking for. I had to create a storage controller for User too, although I don't need one as I don't need to save any files in storage against the users.
I am testing the app further now to see if this sorts my problem completely or I need a storage controller for every entity I use in my app.
In which case it will be really odd as I don't intend to use the storage for all my entities.

Resources