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

"Profile not found" after sending intent #1739

Closed
hemisphire opened this issue Jun 19, 2023 · 6 comments
Closed

"Profile not found" after sending intent #1739

hemisphire opened this issue Jun 19, 2023 · 6 comments
Labels

Comments

@hemisphire
Copy link

System (please complete the following information):

  • OS: Android 13
  • Kernel version (if applicable): n/a
  • strongSwan version(s): 2.4.1
  • Tested/confirmed with the latest version: yes

Describe the bug
I communicate from my app to the StrongSwan app. Importing a profile works fine, as does disconnecting from a connected VPN.
However, trying to connect to the VPN by sending an intent of START_PROFILE to VpnProfileControlActivity always gives me "Profile not found"
Connecting manually by using the StrongSwan app works fine.
I've traced through the source code, and it would appear I'm sending the wrong UUID. But when I edit the profile it's got the same one I sent as the Profile ID.

To Reproduce
Steps to reproduce the behavior:

  1. Use an intent to import a profile
  2. Use an intent to connect

Expected behavior
The connection occurs instead of an error message

Logs/Backtraces

Additional context

@tobiasbrunner
Copy link
Member

I've traced through the source code, and it would appear I'm sending the wrong UUID.

Hm, connecting and disconnecting requires the same UUID in the same org.strongswan.android.VPN_PROFILE_ID String extra, and you claim that the latter works fine (although you haven't mentioned if it works without confirmation). Maybe the UUID is in the wrong format (has to be parsable via UUID.fromString(), check the system log for errors).

@tobiasbrunner tobiasbrunner removed the new label Jun 19, 2023
@hemisphire
Copy link
Author

Ok. You were correct about a problem with my uuid with that intent. I'm not sure if the bug needs a new name or not, but I still have a problem. strongSwan.2.4.1.Log.File8.txt shows my app sending an intent of START_PROFILE to the StrongSwan app, and strongSwan.2.4.1.Log.File9.txt shows connecting manually with the StrongSwan app.

strongSwan 2.4.1 Log File8.txt
strongSwan 2.4.1 Log File9.txt

@tobiasbrunner
Copy link
Member

No idea. Is it reproducible?

@hemisphire
Copy link
Author

I did reproduce it in a smaller app, and then I was able to see this in the log (full one attached):
Key org.strongswan.android.VPN_PROFILE_ID expected String but value was a android.os.Parcel$LazyValue. The default value <null> was returned.
err.log
Test.zip

@tobiasbrunner
Copy link
Member

No idea whatsoever, sorry.

@hemisphire
Copy link
Author

We decided to customize the app to address #1740 and add a custom intent to check status, and right away, this bug is no longer happening (also using latest 2.4.2 source).

@tobiasbrunner tobiasbrunner closed this as not planned Won't fix, can't repro, duplicate, stale Sep 22, 2023
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

2 participants