8000 ## πŸ› Bug Report β€” CoCart JWT Authentication 2.5.0 breaks guest cart session (500 error on `get-cart`) Β· Issue #523 Β· co-cart/co-cart Β· GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
## πŸ› Bug Report β€” CoCart JWT Authentication 2.5.0 breaks guest cart session (500 error on get-cart)Β #523
Closed
@marianobitelo

Description

@marianobitelo

Affected plugin: wpackagist-plugin/cocart-jwt-authentication
Broken version: 2.5.0
Working version: 2.4.0
Stack: WooCommerce + CoCart + WP REST Cache (disabled during testing)
Hosting: AWS (us-east-1)
Reproducibility: Always


πŸ” Problem description

After upgrading to 2.5.0 of the cocart-jwt-authentication plugin, guest (non-authenticated) users are no longer able to interact with the cart. Specifically, the following request fails:

GET /wp-json/cocart/v1/get-cart

Response:

HTTP/1.1 500 Internal Server Error

This occurs even with WP REST Cache fully disabled and no other caching layer interfering.


βœ… Rollback confirmation

Rolling back to version 2.4.0 immediately resolves the issue:

  • Guest cart sessions (wp_cocart_session) work as expected
  • Cart can be used without authentication
  • GET /get-cart returns valid JSON

πŸ§ͺ Additional curl test

curl -i https://yourdomain.com/wp-json/cocart/v1/get-cart
  • On 2.5.0: returns 500 Internal Server Error
  • On 2.4.0: returns expected cart object

πŸ’‘ Hypothesis

Version 2.5.0 may have altered how anonymous sessions are initialized in CoCart, or it may unintentionally enforce authentication headers (JWT) even when none are provided.


πŸ™ Request

Please investigate changes introduced in 2.5.0 related to session handling for non-authenticated users. If this is a bug, a patch release (e.g., 2.5.1) would be greatly appreciated. Otherwise, please document any new behavior or breaking changes introduced.


βœ”οΈ Temporary solution

Reverting to cocart-jwt-authentication version 2.4.0 fixes the issue and restores expected cart behavior for guest users.


Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0