Skip to content
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

I can't seem to get it to work fully #45

Open
spidfire opened this issue Jan 4, 2018 · 7 comments
Open

I can't seem to get it to work fully #45

spidfire opened this issue Jan 4, 2018 · 7 comments
Assignees

Comments

@spidfire
Copy link

spidfire commented Jan 4, 2018

Hi, I've got some problems
The total_sessions function returns nothing and after a bit hacking did I find the response which is: {"message":"App required."}

crashes seem to work correct

and top_issues has an internal response of {"errors":[{"message":"Internal error"}]}

Do you have any clues where I did go wrong?

My script:


require 'fabricio'

client = Fabricio::Client.new do |config|
    config.username = ENV["FABRIC_USER"]
    config.password = ENV["FABRIC_PASS"]
end
oneweek = 60*60*24*7
threeweeks = oneweek*3
now = Time.now.to_i

puts client.app.total_sessions(appid, (now-threeweeks).to_s, now.to_s, '8.8.2.0 (2030)')
puts client.app.crashes(appid, (now-threeweeks).to_s, now.to_s, ['8.8.2.0 (2030)'])
puts client.app.top_issues(appid, (now-threeweeks).to_s, now.to_s, ['8.8.2.0 (2030)'], 10)
@xavierjurado
Copy link

xavierjurado commented Jan 10, 2018

Same here, we are unable to compute the crashfree ratio because the total_sessions request is failing with the aforementioned error. Only some apps seem affected though 🤔 .

@spidfire
Copy link
Author

hmm, 🤔 maybe because only some apps have stats(answers) enabled?

@xavierjurado
Copy link

As far as I can see all our apps have the same configuration in Fabric 😞 .

@spidfire
Copy link
Author

Hmm found maybe something different. I've got 2 accounts and one is member of a sub organisation of the other. And I've got the feeling it has to do with that somewhere. (Ill continue investigating for now)

@xavierjurado
Copy link

xavierjurado commented Jan 11, 2018

You were right, as of now it seems fabricio does not support users with multiple organization. You can see the culprit of the problem in the AuthorizationClient.obtain_organization_id(auth_data) method: https://github.com/strongself/fabricio/blob/develop/lib/fabricio/authorization/authorization_client.rb#L118

We are storing the id of the first organization and ignoring the rest, and then using this identifier to build all the organization-related URL requests. The fix is non-trivial because I've not found a mapping for "organization - app", so we will need to fetch the details of an app (given its identifier) and extract its organization from there.

@spidfire
Copy link
Author

Cool, maybe I will find some time to research this.

Another problem I've encountererd was that the top_issues is not working
return contents from the graphql: {"errors":[{"message":"Internal error"}]}

The actual error:
lib/fabricio/services/app_service.rb:168:in `top_issues': undefined method `[]' for nil:NilClass (NoMethodError)

@xavierjurado
Copy link

I've tried to fix this issue in #46, feel free to check my solution! @spidfire @CognitiveDisson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants