jpush / jpush/jpush-react-native

安卓集成极光推送使用enableProguardInReleaseBuilds后极光推送初始化1005错误

Open
#957 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.4k
Forks
348
PR merge metrics
No merged PRs in 30d

Description

你的运行环境

macos arm64

  • 插件版本: "jcore-react-native": "^2.2.1","jpush-react-native": "^3.1.0"
  • react-native 版本:0.74.5

期望效果

希望使用enableProguardInReleaseBuilds压缩能正常使用

实际效果

开启enableProguardInReleaseBuilds后 无法正确的获取到registerID

重现步骤

  1. 下载master分支
  2. 将build.gradle里面enableProguardInReleaseBuild改为true
  3. build发布版本的release的apk包

Debug logs

包括 Android 或 iOS 的日志:
2024-09-03 13:58:21.643 1226-1586 WindowManager system_server E win=Window{8d8da85 u0 Splash Screen com.yaoyue.invitetianxia EXITING} destroySurfaces: appStopped=false cleanupOnResume=false win.mWindowRemovalAllowed=true win.mRemoveOnExit=true win.mViewVisibility=8 caller=com.android.server.wm.WindowState.onExitAnimationDone:5999 com.android.server.wm.ActivityRecord$$ExternalSyntheticLambda10.accept:2 java.util.ArrayList.forEach:1528 com.android.server.wm.ActivityRecord.onAnimationFinished:8607 com.android.server.wm.WindowContainer.doAnimationFinished:3483 com.android.server.wm.WindowContainer.onAnimationFinished:3495 com.android.server.wm.Task.onAnimationFinished:8636
---------------------------- PROCESS STARTED (22415) for package com.yaoyue.invitetianxia ----------------------------
2024-09-03 13:58:23.373 22415-22415 [secipm] com.yaoyue.invitetianxia D mSecIpmManager setProfileLength com.yaoyue.invitetianxia profile:870
2024-09-03 13:58:26.213 22415-22415 ViewRootIm...nActivity] com.yaoyue.invitetianxia I ViewPostIme pointer 0
2024-09-03 13:58:26.275 22415-22415 ViewRootIm...nActivity] com.yaoyue.invitetianxia I ViewPostIme pointer 1
2024-09-03 13:58:26.283 22415-22458 ReactNativeJS com.yaoyue.invitetianxia I registerID:{"registerID":""}
2024-09-03 13:58:26.506 22415-22533 ProfileInstaller com.yaoyue.invitetianxia D Installing profile for com.yaoyue.invitetianxia
2024-09-03 13:58:27.422 22415-22422 e.invitetianxia com.yaoyue.invitetianxia I Thread[5,tid=22422,WaitingInMainSignalCatcherLoop,Thread*=0xb4000070f821e9a0,peer=0x132c2f00,"Signal Catcher"]: reacting to signal 10
2024-09-03 13:58:27.422 22415-22422 e.invitetianxia com.yaoyue.invitetianxia I
2024-09-03 13:58:27.422 22415-22422 e.invitetianxia com.yaoyue.invitetianxia I SIGUSR1 forcing GC (no HPROF) and profile save
2024-09-03 13:58:27.469 22415-22422 e.invitetianxia com.yaoyue.invitetianxia I Explicit concurrent copying GC freed 5139(2405KB) AllocSpace objects, 41(8092KB) LOS objects, 49% free, 10017KB/19MB, paused 2.466ms,16us total 46.834ms
2024-09-03 13:58:27.469 22415-22425 e.invitetianxia com.yaoyue.invitetianxia I WaitForGcToComplete blocked Background on Explicit for 9.759ms
2024-09-03 13:58:27.539 22415-22415 ViewRootIm...nActivity] com.yaoyue.invitetianxia I ViewPostIme pointer 0
2024-09-03 13:58:27.580 22415-22415 ViewRootIm...nActivity] com.yaoyue.invitetianxia I ViewPostIme pointer 1
2024-09-03 13:58:27.963 22415-22415 ViewRootIm...nActivity] com.yaoyue.invitetianxia I ViewPostIme pointer 0
2024-09-03 13:58:28.012 22415-22415 ViewRootIm...nActivity] com.yaoyue.invitetianxia I ViewPostIme pointer 1
2024-09-03 13:58:28.018 22415-22459 RN-JPush com.yaoyue.invitetianxia D setLoggerEnable:true
2024-09-03 13:58:29.426 22415-22415 [secipm] com.yaoyue.invitetianxia D mSecIpmManager setProfileLength com.yaoyue.invitetianxia profile:7940
2024-09-03 13:58:29.942 22415-22425 e.invitetianxia com.yaoyue.invitetianxia I Background concurrent copying GC freed 6099(3038KB) AllocSpace objects, 143(10MB) LOS objects, 49% free, 10MB/20MB, paused 898us,1.741ms total 108.290ms

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the release APK from the master branch with enableProguardInReleaseBuilds set to true, using the reported React Native, jcore-react-native, and jpush-react-native versions. Inspect build.gradle and the Android logs around registerID initialization; the issue is done when the release build initializes JPush and returns a non-empty registerID.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java, react-native
Domain
build-system, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.