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

su.exe返回值为空。 #755

Closed
Eric-Joker opened this issue Dec 22, 2023 · 4 comments
Closed

su.exe返回值为空。 #755

Eric-Joker opened this issue Dec 22, 2023 · 4 comments
Assignees

Comments

@Eric-Joker
Copy link

Eric-Joker commented Dec 22, 2023

Describe the bug(现象描述)
脚本被成功执行,但是并没有收到通知,log报错。
我估计是没等语句执行完成su.exe就直接返回为空。

To Reproduce(如何复现)
情景模式:
[
{
"name": "something",
"description": "something",
"priority": 0,
"delay": 0,
"condition": "wifiStateChanged == true",
"actions": [
"ui.showNotification("sth.",wifiState.ssid == "sth." || wifiState.ssid == "sth." ? "something" : "something", wifiState.ssid == "sth." || wifiState.ssid == "sth." ? su.exe("/data/something/sth.sh stop") : su.exe("/data/something/sth.sh start"), true)"
]
}
]

Expected behavior(期望结果)
出现通知

Screenshots(截图)
nothing

Version(发现问题的版本):

  • OS: Android 12
  • Version v5.0.1

Additional context(其他信息)
在mt终端模拟器运行语句是有输出的。
shell脚本需要4s-50s才能执行完毕。
将语句改成简单的echo正常。

** Logs**(日志文件)

Error: ui.showNotification("sth.",wifiState.ssid == "sth." || wifiState.ssid == "sth." ? "something" : "something", wifiState.ssid == "sth." || wifiState.ssid == "sth." ? su.exe("/data/something/sth.sh stop") : su.exe("/data/something/sth.sh start"), true): Parameter specified as non-null is null: method github.tornaco.android.thanos.services.n.NotificationManagerService.showNotification, parameter msg]
[Near : {... ui.showNotification("sth.", wif ....}]
^
[Line: 1, Column: 1]
at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(SourceFile:4)
at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(Unknown Source:28)
at org.mvel2.optimizers.dynamic.DynamicOptimizer.optimizeAccessor(Unknown Source:35)
at org.mvel2.ast.ASTNode.optimize(Unknown Source:93)
at org.mvel2.ast.ASTNode.getReducedValueAccelerated(Unknown Source:17)
at org.mvel2.MVELRuntime.execute(Unknown Source:48)
at org.mvel2.compiler.CompiledExpression.getDirectValue(Unknown Source:19)
at org.mvel2.compiler.CompiledExpression.getValue(Unknown Source:20)
at org.mvel2.compiler.CompiledExpression.getValue(Unknown Source:7)
at org.mvel2.MVEL.executeExpression(Unknown Source:8)
at wi.a.execute(Unknown Source:6)
at wi.b.execute(Unknown Source:18)
at github.tornaco.android.thanos.services.profile.rules.mvel.MVELRuleExt.normalExe(Unknown Source:22)
at github.tornaco.android.thanos.services.profile.rules.mvel.MVELRuleExt.execute(Unknown Source:16)
at org.jeasy.rules.core.DefaultRulesEngine.doFire(SourceFile:6)
at org.jeasy.rules.core.DefaultRulesEngine.fire(Unknown Source:3)
at github.tornaco.android.thanos.services.profile.ProfileService.publishFactsInternal(SourceFile:4)
at github.tornaco.android.thanos.services.profile.ProfileService.publishFacts$lambda$44(Unknown Source:15)
at github.tornaco.android.thanos.services.profile.ProfileService.v(Unknown Source:0)
at github.tornaco.android.thanos.services.app.infinite.a.run(SourceFile:8)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:210)
at android.os.Looper.loop(Looper.java:299)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getMethod(SourceFile:10)
at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getMethod(Unknown Source:240)
at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(Unknown Source:55)
... 24 more
Caused by: java.lang.NullPointerException: Parameter specified as non-null is null: method github.tornaco.android.thanos.services.n.NotificationManagerService.showNotification, parameter msg
at github.tornaco.android.thanos.services.n.NotificationManagerService.showNotification(Unknown Source:25)
at github.tornaco.android.thanos.services.profile.handle.UIImpl.showNotification(Unknown Source:20)
... 28 more
@Tornaco Tornaco self-assigned this Dec 28, 2023
@Tornaco
Copy link
Owner

Tornaco commented Dec 28, 2023

@Eric-Joker 按照首页最下方反馈提示,抓取完整日志。

@Eric-Joker
Copy link
Author

Eric-Joker commented Dec 28, 2023

profile.log

@Eric-Joker 按照首页最下方反馈提示,抓取完整日志。

这个日志?

补充:有时候脚本运行得快了(两三秒左右?)正常通知。

@Tornaco
Copy link
Owner

Tornaco commented Mar 26, 2024

@Eric-Joker 最新版是不是好了

@Eric-Joker
Copy link
Author

Eric-Joker commented Mar 26, 2024 via email

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

2 participants