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

Add button to send error report #165

Open
niccokunzmann opened this issue Sep 29, 2018 · 12 comments
Open

Add button to send error report #165

niccokunzmann opened this issue Sep 29, 2018 · 12 comments
Labels
enhancement New feature or request Nicco does not want to solve this Nicco will probably not do that

Comments

@niccokunzmann
Copy link
Owner

niccokunzmann commented Sep 29, 2018

When I see the error report, I would like to see a button asking me to send it.


We're using [Polar.sh](https://polar.sh/niccokunzmann) so you can upvote and help fund this issue. We receive the funding once the issue is completed & confirmed by you. Thank you in advance for helping prioritize & fund our work. Fund with Polar
@niccokunzmann niccokunzmann added enhancement New feature or request Nicco does not want to solve this Nicco will probably not do that labels Sep 29, 2018
@robkoro
Copy link
Contributor

robkoro commented Nov 5, 2018

Hi @niccokunzmann,

Could you please specify few details about this issue?
To solve this I need:

  • How to reproduce error of which error report should be sent
  • What does error report contain? (StackTrace/User defined text?)
  • How should be report sent? (email? / database?)

I would really appreciate if I could work on thi issue, but need answers to design questions.

Thanks,
robkoro

@niccokunzmann
Copy link
Owner Author

We have the file of the error report. This file should be transferred somewhere. I do not know exactly how to do this best or where to put it. This issue is from the user side of things.

We could

  1. open a new issue for each error report, informing the user that they can comment on it and view the progress online on github
  2. attach the error reports to an existing issue, just to gather them and open issues if we need them
  3. upload the file somewhere
  4. send an e-mail to me (preferrably not)

There might be existing solutions to this but I also think it is ok to build something again. We can create a new github user for this and let it open the issues.

@robkoro
Copy link
Contributor

robkoro commented Nov 5, 2018

I have an idea, we (you), could make an email on google, something like mundraub@gmail.com, which to we could have disk assigned and we could send file there, what do you think about it?

Also this method would require a person to manually read those files and open issues for them. Maybe automated in future?

@niccokunzmann
Copy link
Owner Author

This requires the same amount of work as opening an issue: https://developer.github.com/v3/issues/#create-an-issue
It is "just" an HTTP-Post with the correct credentials.

We could also create a google group to which we send the mail. This way, we can reference them as a link from issues.

@robkoro
Copy link
Contributor

robkoro commented Nov 5, 2018

I understand, that programatic effort is same, yet, if we receive an email report we could open issue if it is relevant, so it was not solved by any previous version, but if we open issue on every error report, it would make a lot of meaningles issue, which would be duplicates, so they will be closed anyway and that makes no sense to me personally.

@niccokunzmann
Copy link
Owner Author

niccokunzmann commented Nov 5, 2018

I understand. I cannot evaluate how much duplicates we get. So, I will go with the decision of the person implementing this.

I would add:
There is a new feature - maybe not visible to you - "transfer an issue". Transferred issues redirect. Example: https://github.com/niccokunzmann/tutanota/issues/1 (watch the URL)
We can post the issues to a repository like mundraub-android-error-reports and transfer them if we like while keeping up the ability for users to comment, reference, close and update their error reports on this platform.
What do you think?

Edit: I do not like to be the bottle neck. If we use issues directly, the process is never hidden and even "if I die", things can go on.

@niccokunzmann
Copy link
Owner Author

This is not a no to mail. Mail is already better than what is there now.

@robkoro
Copy link
Contributor

robkoro commented Nov 7, 2018

Hello @niccokunzmann ,

Sorry for late response, I had some important things to do and day only have 24 hours :(

Yet,
I did some local changes, because I noticed there is error logger using external storage which is not always available, so I preffer to use application data storage (/data/data/package_name) which is always available and does not require user permission. Using external storage without permission means we cannot write files, yet user would want to post an issue, but post without error file would be useless.

Plan for next time I get to this (tommorow/friday - 8/11 or 9/11) is to post error log file to the git repository you mentioned before, since once transfer issue is new to me and in my humble opinion it looks good for our sake.

Could you please provide repository, which will be used for issue posting?
(Of course I create one for purpose of testing)

Local changes are not commited because I prefer to make it in 1 commit to prevent merge conflicts if it will be accepted.

  • robkoro

@niccokunzmann
Copy link
Owner Author

niccokunzmann commented Nov 8, 2018

Sorry for late response

No problem. I have time.

I did some local changes, because I noticed there is error logger using external storage which is not always available

This is true. In case the first activity has an error, the external storage is available before the activity.

so I preffer to use application data storage (/data/data/package_name) which is always available and does not require user permission.

You can get the path to that one here in setActivity:

public void setActivity(Activity newActivity) {

Using external storage without permission means we cannot write files, yet user would want to post an issue, but post without error file would be useless.

This is true.

Could you please provide repository, which will be used for issue posting?

It is there and you have write access: https://github.com/niccokunzmann/mundraub-android-error-reports/invitations

Local changes are not commited because I prefer to make it in 1 commit to prevent merge conflicts if it will be accepted.

You can make several commits.

  • I do not think we will have changes there, soon.
  • There is Squash&Merge which creates one commit
  • you can use git rebase -i HEAD~5 to edit and put 5 last commits into one
  • I can have a look while you are working on it and if you get stuck or stop working, we have more knowledge than if you kept it to yourself.

I also accept one commit if this is what you like to do.

robkoro added a commit to robkoro/mundraub-android that referenced this issue Nov 9, 2018
- Error report being created in EXTERNAL_STORAGE
- Logging file is not being formatted correctly

Solutions:
- Ensure we create file in internal memory, if external is not available. Also don't create file each time it is accessed (static member added)
- Add \n to the end of line (cannot use println, because we write TAG and MESSAGE separated)

- Add button to send error report niccokunzmann#165
- partial bug fix
@robkoro
Copy link
Contributor

robkoro commented Nov 9, 2018

Hello nicco,
I have added some code via commit https://github.com/robkoro/mundraub-android/commit/6a005f236dc9fa1b4ff695aa8b139d7894719728

Commit change:

  • Added internal storage file if external storage is not available
  • added new line in print method of logger for better formatting.

You can get path to that one here in setActivity:

Well, we are creating logfile before activity is set, because before we provide activity Android initialize static members, what result in calling Logger constructor since we are creating logger as soon as possible:

     static {
         // crate logger as soon as possible
         getInstance();
}

This is just a partial fix, so now we are just delete file once user hits yes in dialog.

Rewriting dialog message is easiest part, so I left it as a dessert.

@niccokunzmann
Copy link
Owner Author

You made a commit but the commit is not related to the issue. The issue is about sending the error report. The commit is about changing how the error report is created. We can make a new issue about changing how the report is created.

robkoro added a commit to robkoro/mundraub-android that referenced this issue Nov 11, 2018
                 - Error report being created in EXTERNAL_STORAGE
                 - Logging file is not being formatted correctly

                 Solutions:
                 - Ensure we create file in internal memory, if external is not available. Also don't create file each time it is accessed (static member added)
                 - Add \n to the end of line (cannot use println, because we write TAG and MESSAGE separated)

                 - Add button to send error report niccokunzmann#165
                 - partial bug fix
@robkoro
Copy link
Contributor

robkoro commented Nov 11, 2018

Hello, that would be great, if we make another issue which would be addressed by these changes.
Could you please make it? 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Nicco does not want to solve this Nicco will probably not do that
Projects
None yet
Development

No branches or pull requests

2 participants