GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Java 21 regression bug: in a .jsp, request.getUserPrincipal() returns null despite being logged in · Issue #241 · GoogleCloudPlatform/appengine-java-standard

Java 21 regression bug: in a .jsp, request.getUserPrincipal() returns null despite being logged in #241

New issue
Copy link
New issue
Copy link
Closed
#243
Closed
Java 21 regression bug: in a .jsp, request.getUserPrincipal() returns null despite being logged in#241
#243
Copy link
Assignees
ludochlachlan-roberts

Description

@cyril-briquet
cyril-briquet
opened on Jul 2, 2024
Issue body actions

When setting java21 in appengine-web.xml,
in a .jsp, the call request.getUserPrincipal() returns null despite being logged in.

Activity

  1. ludoch
    self-assigned this
    on Jul 2, 2024
  2. ludoch commented on Jul 2, 2024

    @ludoch
    ludoch
    on Jul 2, 2024
    Contributor
    More actions

    Both prod and local server?

  3. cyril-briquet commented on Jul 2, 2024

    @cyril-briquet
    cyril-briquet
    on Jul 2, 2024
    Author
    More actions

    Local server yes; production server I haven't tried.

  4. cyril-briquet commented on Jul 2, 2024

    @cyril-briquet
    cyril-briquet
    on Jul 2, 2024
    Author
    More actions

    Both prod and local server?

    I've just tried on a prod server: the answer is yes, both indeed.

  5. lachlan-roberts
    added a commit that references this issue on Jul 3, 2024

    Issue #241 - fix deferred authentication for Java21 EE10 runtime

    7dce20b
  6. lachlan-roberts commented on Jul 3, 2024

    @lachlan-roberts
    lachlan-roberts
    on Jul 3, 2024
    Collaborator
    More actions

    Opened PR #243 to fix this.

  7. copybara-service
    closed this as completedin #243on Jul 3, 2024
  8. ludoch commented on Jul 3, 2024

    @ludoch
    ludoch
    on Jul 3, 2024
    Contributor
    More actions

    Code fix is now checked in.
    Will reach prod end of next week or next (due to 4rth of July break in US).
    Meanwhile, you can try following for the next few days https://github.com/GoogleCloudPlatform/appengine-java-standard/blob/main/TRYLATESTBITSINPROD.md from head (Sorry, Maven only, gradle contribution welcome).

  9. cyril-briquet commented on Aug 4, 2024

    @cyril-briquet
    cyril-briquet
    on Aug 4, 2024
    Author
    More actions

    Update: bug is fixed in local devserver, but not in production server

  10. ludoch
    assigned
    lachlan-roberts
    on Aug 4, 2024
  11. ludoch commented on Aug 4, 2024

    @ludoch
    ludoch
    on Aug 4, 2024
    Contributor
    More actions

    A bit strange as the code area for the fix also applies to prod... Maybe one thing to try first is to go to the admin console, app engine instances page and try to kill whatever running instance you see to force a restart?

    Restarts are not automatically done anymore...

  12. cyril-briquet commented on Aug 4, 2024

    @cyril-briquet
    cyril-briquet
    on Aug 4, 2024
    Author
    More actions

    Thanks for your rapid answer.

    As suggested, I went to the admin console, AE instances page and killed the one instance that was running (apparently, it always restarts automatically even before I try to access the app in production as a user).

    FWIW, here is the code that correctly displays the user's e-mail with the dev server and null with the prod server:

    <%= (request.getUserPrincipal() != null) ? request.getUserPrincipal().getName() : "null" %>

  13. ludoch commented on Aug 5, 2024

    @ludoch
    ludoch
    on Aug 5, 2024
    Contributor
    More actions

    Thanks!
    Sorry about that, we believe 3d53db9 should address it. Tested only manually, looking for a prod e2e test...

  14. cyril-briquet commented on Aug 6, 2024

    @cyril-briquet
    cyril-briquet
    on Aug 6, 2024
    Author
    More actions

    test-files.txt

    Please find here as an attached file the source code of a test web app exercising the bug

  15. cyril-briquet commented on Sep 20, 2024

    @cyril-briquet
    cyril-briquet
    on Sep 20, 2024
    Author
    More actions

    Works for me: bug not observed any more on the production server.
    Thanks for the patches.

    Reacted by Ludovic Champenois
  16. srinjoyray
    added a commit that references this issue on Nov 12, 2024

    Issue #241 - fix deferred authentication for Java21 EE10 runtime

    335fe84
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @lachlan-roberts
    lachlan-roberts
  • @ludoch
    ludoch

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.