Skip to content

Storage emulator shows WARNING: sun.misc.Unsafe::arrayBaseOffset on Java 24 #9623

@aalej

Description

@aalej

[REQUIRED] Environment info

firebase-tools: v15.0.0

Platform: macOS

Java: v24

[REQUIRED] Test case

See "Steps to reproduce"

[REQUIRED] Steps to reproduce

  1. Run firebase init storage
    • Please select an option: Don't set up a default project
    • What file should be used for Storage Rules? storage.rules
  2. Run firebase emulators:start --project demo-project

[REQUIRED] Expected behavior

No waning message when starting the emulators

$ java --version
openjdk 22.0.2 2024-07-16
OpenJDK Runtime Environment Zulu22.32+15-CA (build 22.0.2+9)
OpenJDK 64-Bit Server VM Zulu22.32+15-CA (build 22.0.2+9, mixed mode, sharing)
$ firebase emulators:start --project demo-project
i  emulators: Starting emulators: storage
i  emulators: Detected demo project ID "demo-project", emulated services will use a demo configuration and attempts to access non-emulated services for this project will fail.

┌─────────────────────────────────────────────────────────────┐
│ ✔  All emulators ready! It is now safe to connect your app. │
│ i  View Emulator UI at http://127.0.0.1:4000/               │
└─────────────────────────────────────────────────────────────┘

┌──────────┬────────────────┬───────────────────────────────┐
│ Emulator │ Host:Port      │ View in Emulator UI           │
├──────────┼────────────────┼───────────────────────────────┤
│ Storage  │ 127.0.0.1:9199 │ http://127.0.0.1:4000/storage │
└──────────┴────────────────┴───────────────────────────────┘
  Emulator Hub host: 127.0.0.1 port: 4400
  Other reserved ports: 4500

Issues? Report them at https://github.com/firebase/firebase-tools/issues and attach the *-debug.log files.
 

[REQUIRED] Actual behavior

Warning message when starting the emulator WARNING: sun.misc.Unsafe::arrayBaseOffset has been called by com.google.protobuf.UnsafeUtil$MemoryAccessor

$ java --version
openjdk 24.0.2 2025-07-15
OpenJDK Runtime Environment Zulu24.32+13-CA (build 24.0.2+12)
OpenJDK 64-Bit Server VM Zulu24.32+13-CA (build 24.0.2+12, mixed mode, sharing)
$ firebase emulators:start --project demo-project
i  emulators: Starting emulators: storage
i  emulators: Detected demo project ID "demo-project", emulated services will use a demo configuration and attempts to access non-emulated services for this project will fail.
⚠  Unexpected rules runtime error: WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::arrayBaseOffset has been called by com.google.protobuf.UnsafeUtil$MemoryAccessor (file:/Users/alejandromarco/.cache/firebase/emulators/cloud-storage-rules-runtime-v1.1.3.jar)
WARNING: Please consider reporting this to the maintainers of class com.google.protobuf.UnsafeUtil$MemoryAccessor
WARNING: sun.misc.Unsafe::arrayBaseOffset will be removed in a future release


┌─────────────────────────────────────────────────────────────┐
│ ✔  All emulators ready! It is now safe to connect your app. │
│ i  View Emulator UI at http://127.0.0.1:4000/               │
└─────────────────────────────────────────────────────────────┘

┌──────────┬────────────────┬───────────────────────────────┐
│ Emulator │ Host:Port      │ View in Emulator UI           │
├──────────┼────────────────┼───────────────────────────────┤
│ Storage  │ 127.0.0.1:9199 │ http://127.0.0.1:4000/storage │
└──────────┴────────────────┴───────────────────────────────┘
  Emulator Hub host: 127.0.0.1 port: 4400
  Other reserved ports: 4500

Issues? Report them at https://github.com/firebase/firebase-tools/issues and attach the *-debug.log files.
 

Notes

This occurs on Java 24, no warning messages are shown on Java 22

AFAICT, the storage emulator works without any issues even with the warning message

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions