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

error: cannot find symbo #132

Closed
raxon opened this issue Sep 23, 2022 · 6 comments
Closed

error: cannot find symbo #132

raxon opened this issue Sep 23, 2022 · 6 comments
Labels
Milestone

Comments

@raxon
Copy link

raxon commented Sep 23, 2022

After add plugin to cordova 10 and try build i got error, on ios works like normal

platforms/android/app/src/main/java/android/MixpanelPlugin.java:333: error: cannot find symbol
        mixpanel.getPeople().setPushRegistrationId(pushId);
                            ^
  symbol:   method setPushRegistrationId(String)
  location: interface People
@alexander0205
Copy link

Having the same error .

@steadev
Copy link

steadev commented Oct 7, 2022

Same error either...

@alexander0205
Copy link

I know this is not the best practice but is a quick solution.

1- On the project root create folder 'modules'
2- Copy the folders 'cordova-plugin-mixpanel' and 'mixpanel' to the new folder 'modules'
Example:

-ProjectRoot
-- modules
---- cordova-plugin-mixpanel
---- mixpanel
-- package.json
.......
3- Add the dependency on package.json

{
  "dependencies": {
      "@awesome-cordova-plugins/mixpanel": "file:modules/mixpanel",
      "cordova-plugin-mixpanel": "file:modules/cordova-plugin-mixpanel",
  }
}

4- Go to '/modules/cordova-plugin-mixpanel/src/android/MixpanelPlugin.java'
4.1- find 'mixpanel.getPeople().setPushRegistrationId(pushId)',
4.2- Comment this line or change it with the new way or official documentation.

5- Remove node_modules and install again, sync .

Note:
I was looking for the method setPushRegistrationId but apparently is not official on mixPanel .
Feel free to destroy mi opinion.

maurotrigo added a commit to cityheroes/cordova-mixpanel-plugin that referenced this issue Nov 10, 2022
@adamk22
Copy link

adamk22 commented Dec 20, 2022

Ran into the same problem.. it works when commenting out mixpanel.getPeople().setPushRegistrationId(pushId); in the MixpanelPlugin.java file (same file from above)

    private boolean handlePeopleSetPushId(JSONArray args, final CallbackContext cbCtx) {
        String pushId = args.optString(0);
         // mixpanel.getPeople().setPushRegistrationId(pushId);
        cbCtx.success();
        return true;
    }

Although a more definite solution is prefered.

Edit:
After some research I found out that because Mixpanel has discontinued their push services (Messages & Experiments) and removed it from their API since 6.0.0 (https://github.com/mixpanel/mixpanel-android/wiki/Changelog). setPushRegistrationId() was still available prior to that. Made a PR to completely remove it for Android: #133 . It's already been removed on the iOS side.

@victorsosa
Copy link
Collaborator

Thanks, this will be include in next release

@victorsosa victorsosa added this to the 5.0.1 milestone Aug 8, 2023
@victorsosa victorsosa added the bug label Aug 8, 2023
@victorsosa
Copy link
Collaborator

package published

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

No branches or pull requests

5 participants