Skip to content

Fail to start the FTP server with regression #4377

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

Closed
Bambooin opened this issue Apr 1, 2025 · 1 comment · Fixed by #4378
Closed

Fail to start the FTP server with regression #4377

Bambooin opened this issue Apr 1, 2025 · 1 comment · Fixed by #4378
Assignees
Labels
Area-FTP Related to FTP Server. Issue-Bug Related unexpected behavior or something worth investigating.

Comments

@Bambooin
Copy link
Contributor

Bambooin commented Apr 1, 2025

Describe the bug
A clear and concise description of what the bug is.

Fail to start the FTP server with this commit:70687e4ec7ea74ae5dac32e77378d9b6026bca07

Revert this commit will make the FTP server work again.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Amaze'
  2. Click on 'FTP Server'
  3. Click 'Start'
  4. The App crashs, no error report shows up at all.

Expected behavior
A clear and concise description of what you expected to happen.
The FTP server was started.

Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Device: [_]
  • OS: [Android 13]
  • Rooted: [No]
  • Version: [Latest commit in release/4.0]

Additional context
Add any other context about the problem here.

@TranceLove TranceLove self-assigned this Apr 1, 2025
@TranceLove
Copy link
Collaborator

TranceLove commented Apr 1, 2025

Actually there is exception thrown.

2025-04-01 23:47:13.666  2483-2483  AndroidRuntime          com.amaze.filemanager.debug          E  FATAL EXCEPTION: main
                                                                                                    Process: com.amaze.filemanager.debug, PID: 2483
Process: com.amaze.filemanager.debug, PID: 2483
java.lang.RuntimeException: Unable to start service com.amaze.filemanager.asynchronous.services.ftp.FtpService@a1d722c with Intent { cmp=com.amaze.filemanager.debug/com.amaze.filemanager.asynchronous.services.ftp.FtpService }: java.lang.IllegalArgumentException: foregroundServiceType 0x00000001 is not a subset of foregroundServiceType attribute 0x00000000 in service element of manifest file
	at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4839)
	at android.app.ActivityThread.-$$Nest$mhandleServiceArgs(Unknown Source:0)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2289)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loopOnce(Looper.java:205)
	at android.os.Looper.loop(Looper.java:294)
	at android.app.ActivityThread.main(ActivityThread.java:8177)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
Caused by: java.lang.IllegalArgumentException: foregroundServiceType 0x00000001 is not a subset of foregroundServiceType attribute 0x00000000 in service element of manifest file
	at android.os.Parcel.createExceptionOrNull(Parcel.java:3061)
	at android.os.Parcel.createException(Parcel.java:3041)
	at android.os.Parcel.readException(Parcel.java:3024)
	at android.os.Parcel.readException(Parcel.java:2966)
	at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:6761)
	at java.lang.reflect.Method.invoke(Native Method)
	at leakcanary.ServiceWatcher$install$4$2.invoke(ServiceWatcher.kt:85)
	at java.lang.reflect.Proxy.invoke(Proxy.java:1006)
	at $Proxy4.setServiceForeground(Unknown Source)
	at android.app.Service.startForeground(Service.java:862)
	at androidx.core.app.ServiceCompat$Api34Impl.startForeground(ServiceCompat.java:241)
	at androidx.core.app.ServiceCompat.startForeground(ServiceCompat.java:172)
	at com.amaze.filemanager.asynchronous.services.ftp.FtpService.onStartCommand(FtpService.kt:120)
	at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4821)
	at android.app.ActivityThread.-$$Nest$mhandleServiceArgs(Unknown Source:0at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2289at android.os.Handler.dispatchMessage(Handler.java:106at android.os.Looper.loopOnce(Looper.java:205at android.os.Looper.loop(Looper.java:294at android.app.ActivityThread.main(ActivityThread.java:8177at java.lang.reflect.Method.invoke(Native Methodat com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971Caused by: android.os.RemoteException: Remote stack trace:
	at com.android.server.am.ActiveServices.setServiceForegroundInnerLocked(ActiveServices.java:2053)
	at com.android.server.am.ActiveServices.setServiceForegroundLocked(ActiveServices.java:1679)
	at com.android.server.am.ActivityManagerService.setServiceForeground(ActivityManagerService.java:13281)
	at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:3385)
	at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2720)

@TranceLove TranceLove added Issue-Bug Related unexpected behavior or something worth investigating. Area-FTP Related to FTP Server. labels Apr 2, 2025
TranceLove added a commit that referenced this issue Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-FTP Related to FTP Server. Issue-Bug Related unexpected behavior or something worth investigating.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants