question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android: Error deleting cookie whose name starts with "session"

See original GitHub issue

The problem

When I try to delete a cookie named session-id on Android, I get this exception:

An unknown server-side error occurred while processing the command. Original error: Could not proxy. Proxy error: Could not find :session section for url: /session2-id-longer-really-long-name (WARNING: The server did not provide any stacktrace information)

This happens for any cookie that starts with session, like session-id2 or session2-id. Cookies named session give a slightly different but similar error.

However, if I use driver.manage().deleteAllCookies(), the cookie is deleted without error.

Environment

  • Appium version (or git revision) that exhibits the issue: 1.8.1
  • Desktop OS/version used to run Appium: OS X Sierra
  • Mobile platform/version under test: Android 8.0
  • Real device or emulator/simulator: Emulator (although it happens on Sauce Labs and Browser Stack with real devices, too)
  • Appium CLI or Appium.app|exe: Appium.app

Details

If necessary, describe the problem you have been experiencing in more detail.

Link to Appium logs

This log is from when I ran it locally: https://gist.github.com/MicahLC/a058b3d07ba494c2912506b33e22f0eb

Code To Reproduce Issue [ Good To Have ]

https://github.com/MicahLC/android_session_cookie_bug

I had already created this repro case by the time I saw the instructions about the sample-code directory. Please let me know if this repro case isn’t usable and I’ll update it to use the sample-code.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
imurchiecommented, Jul 17, 2018

The problem was in our parsing of the url when proxying. See https://github.com/appium/appium-base-driver/pull/236

0reactions
lock[bot]commented, Jul 19, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Session cookie not remove on browser close - Stack Overflow
For chrome and android stock browser, JSESSIONID cookie parameter are not removed even on browser close. As most of the websites are tracking ......
Read more >
Clear, enable, and manage cookies in Chrome - Google Support
Delete specific cookies · On your computer, open Chrome Chrome . · At the top right, click More More and then Settings ·...
Read more >
CookieManager - Android Developers
The WebView handles removing expired cookies automatically. ... Removes all session cookies, which are cookies without an expiration date.
Read more >
cookies.remove() - Mozilla - MDN Web Docs
The remove() method of the cookies API deletes a cookie, given its name and URL. The call succeeds only if you include the...
Read more >
Manage Session Cookies | Firebase Authentication
If the cookie is invalid, make sure it is cleared, and ask the user to sign in again. An additional option is available...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found