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

How can I open user feedback popup in my simulator after throws an exception #745

Closed
4 tasks
nihp opened this issue Jan 23, 2020 · 2 comments
Closed
4 tasks

Comments

@nihp
Copy link

nihp commented Jan 23, 2020

OS:

  • MacOS

Platform:

  • iOS
  • Android

SDK:

  • @sentry/react-native

react-native version: 0.61.5

Init Code:

Sentry.init({
  dsn: 'https://[email protected]/...'
});

I have following issue:
I tried to open the showReportDialog to send the user feedback. But it fails to open the popup window in my simulator.

Actual result:
It throws an error as "undefined is not a function (near '..Sentry.showReportDialog..')

How the report dialog will opens in my simulator. Can anyone have any example for this in react-native.

I have added the following in my App.js file

import * as Sentry from "@sentry/react-native";

Sentry.init({
    dsn: 'DSN',
    beforeSend(event) {
            return event;
    },
 });
var eventId = Sentry.captureMessage('User Feedback', function() {});
Sentry.showReportDialog({
    eventId: eventId,
    title: 'Policies and Procedures Feedback',
        subtitle:
       'Please enter your information to submit feedback for the Policies and Procedures.',
    subtitle2: '',
    labelComments: 'Feedback',
    labelSubmit: 'Submit Feedback',
    // user: { name: this.user.name, email: this.user.email },
});


Sentry.setTag("myTag", "tag-value");
Sentry.setExtra("myExtra", "extra-value");
Sentry.addBreadcrumb({ message: "test" });
//Sentry.setUser({ id: AppSettings.deviceLogin })

//Sentry.nativeCrash();
Sentry.captureMessage("Hello Sentry!");
Sentry.showReportDialog();


@wodCZ
Copy link

wodCZ commented Feb 10, 2020

I believe the report dialog is not supported in react-native.

@HazAT
Copy link
Member

HazAT commented Feb 12, 2020

Please follow this, we will most likely add support for this by providing an API but not a UI.
#500

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