0

hello i have a ruby project , i have installed the gem stackdriver and in my config/environments*rb file i have

require "google/cloud/debugger" debugger = Google::Cloud::Debugger.new( project: "my-project", keyfile: "/home/vof/account.json" ) debugger.project debugger.start

i am using gcp so when i go to debugger in gcp i get a drop down of ruby-app with the error No source version information was provided by the deployed application

what could be the issue??

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
cjmash
  • 173
  • 1
  • 2
  • 10

2 Answers2

1

Run the gcloud debug source gen-repo-info-file command. https://cloud.google.com/sdk/gcloud/reference/debug/source/gen-repo-info-file

Place the source-context.json file in the root of your app (or anywhere in the path). https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/google-cloud-debugger/lib/google/cloud/debugger/debuggee.rb#L136

Redeploy your app with the source-context.json file.

I notice that it's not well documented. We'll fix that.

Erez Haba
  • 216
  • 1
  • 3
0

this worked pretty well for me. The problem now is it can access the github repo but cannot find the source code

Using GitHub Repository WinstonKamau/vof-tracker@b3ac3f.

The current source code version was provided by the deployed application.

Can't find the source code repository.

could this be because it is a private repository??

the gcloud debug source gen-repo-info-file generates two files source-contexts.json and source-context.json i pushed them both and redeployed

cjmash
  • 173
  • 1
  • 2
  • 10
  • 1
    If you take a look at this link it suggests this may be as a permission issue, I would check that you have the correct permissions. https://help.github.com/articles/error-repository-not-found/ . If this doesn't work, as this is a separate issue to your original one, I would advise opening a new question on Stackoverflow. – neilH Feb 19 '18 at 16:25
  • 1
    Right, most likely a permission issue. Do you have multiple github accounts? Is the one you used for the Debug page OAuth flow has access to this repo? Try accessing the repo directly from the browser https://github.com/WinstonKamau/vof-tracker are you successful? If you need to use a different account, revoke the OAuth token for 'Stackdriver' on github, logout from github, and try access your app on the Debug page again. This time login with the 'right' github user. – Erez Haba Feb 19 '18 at 18:22