# RangeError
Variant: Message history index out of range (endpoint messages)

First seen: about 4 hours ago · Last seen: about 3 hours ago
Occurrences: 14
Resolved: No

## Info
- Message: Variant: Message history index out of range (content messages)
- When: about 3 hours ago
- Occurred: 2025-11-13 10:05:57 UTC
- Occurred Local: 2025-11-13 10:05:57 (Etc/UTC)
- Handled: Yes
- Severity: error
- Environment: production
- Platform: javascript
- Project: Chat Frontend
- Release Version: chat_frontend-v1.0
- Sourcemap Applied: No

## Backtrace
### Main
- Type: RangeError
- Value: Variant: Message history index out of range (content messages)
- Module: -

1. http://localhost:8080/static/react-test-bundle.min.js, line 467:7110 in `o` (in_app)
2. http://localhost:8080/static/react-test-bundle.min.js, line 467:7138 in `J4` (in_app)
3. http://localhost:8080/static/react-test-bundle.min.js, line 467:8067 in `?` (in_app)
4. http://localhost:8080/static/react-test-bundle.min.js, line 14:11199 in `pg.withScope` (in_app)
5. http://localhost:8080/static/react-test-bundle.min.js, line 14:10646 in `Object._A [as withScope]` (in_app)
6. http://localhost:8080/static/react-test-bundle.min.js, line 14:10292 in `Ge` (in_app)
7. http://localhost:8080/static/react-test-bundle.min.js, line 467:7383 in `yR` (in_app)

## Breadcrumbs
- Time: 10:05:57.296 AM, Cat: -, Level: info, Msg: User joined room, Type: -
- Time: 10:05:56.209 AM, Cat: console, Level: log, Msg: Sent error: Expected string for username, got endpoint, Type: -
### Data
```json
{"arguments":["Sent error: Expected string for username, got endpoint"],"logger":"console"}
```
- Time: 10:05:56.204 AM, Cat: sentry.event, Level: error, Msg: TypeError: Expected string for username, got endpoint, Type: -
- Time: 10:05:56.200 AM, Cat: -, Level: info, Msg: User joined room, Type: -
- Time: 10:04:00.440 AM, Cat: console, Level: log, Msg: Sent error: Expected string for username, got int, Type: -
### Data
```json
{"arguments":["Sent error: Expected string for username, got int"],"logger":"console"}
```
- Time: 10:04:00.436 AM, Cat: sentry.event, Level: error, Msg: TypeError: Expected string for username, got int, Type: -
- Time: 10:04:00.434 AM, Cat: -, Level: info, Msg: User typing, Type: -
- Time: 10:03:29.170 AM, Cat: console, Level: log, Msg: Sent error: Invalid message format '45', Type: -
### Data
```json
{"arguments":["Sent error: Invalid message format '45'"],"logger":"console"}
```
- Time: 10:03:29.165 AM, Cat: sentry.event, Level: error, Msg: Error: Invalid message format '45', Type: -
- Time: 10:03:29.164 AM, Cat: -, Level: info, Msg: Attachment uploaded, Type: -
- Time: 10:02:10.280 AM, Cat: console, Level: log, Msg: Sent error: Variant: Invalid message format 'timestamp', Type: -
### Data
```json
{"arguments":["Sent error: Variant: Invalid message format 'timestamp'"],"logger":"console"}
```
- Time: 10:02:10.279 AM, Cat: sentry.event, Level: error, Msg: Error: Variant: Invalid message format 'timestamp', Type: -
- Time: 10:02:10.278 AM, Cat: -, Level: info, Msg: Attachment uploaded, Type: -
- Time: 10:01:26.743 AM, Cat: console, Level: log, Msg: Sent error: Variant: Invalid message format '47', Type: -
### Data
```json
{"arguments":["Sent error: Variant: Invalid message format '47'"],"logger":"console"}
```
- Time: 10:01:26.737 AM, Cat: sentry.event, Level: error, Msg: Error: Variant: Invalid message format '47', Type: -
- Time: 10:01:26.734 AM, Cat: -, Level: info, Msg: Fetched chat history, Type: -
- Time: 09:02:49.216 AM, Cat: console, Level: log, Msg: Sent error: Variant: Missing 'int' prop in Message component, Type: -
### Data
```json
{"arguments":["Sent error: Variant: Missing 'int' prop in Message component"],"logger":"console"}
```
- Time: 09:02:49.211 AM, Cat: sentry.event, Level: error, Msg: TypeError: Variant: Missing 'int' prop in Message component, Type: -
- Time: 09:02:49.210 AM, Cat: -, Level: info, Msg: User typing, Type: -
- Time: 09:02:48.221 AM, Cat: console, Level: log, Msg: Sent error: Variant: Expected string for username, got content, Type: -
### Data
```json
{"arguments":["Sent error: Variant: Expected string for username, got content"],"logger":"console"}
```
- Time: 09:02:48.217 AM, Cat: sentry.event, Level: error, Msg: TypeError: Variant: Expected string for username, got content, Type: -
- Time: 09:02:48.216 AM, Cat: -, Level: info, Msg: Fetched chat history, Type: -
- Time: 09:02:46.812 AM, Cat: console, Level: log, Msg: Sent error: Expected string for username, got timestamp, Type: -
### Data
```json
{"arguments":["Sent error: Expected string for username, got timestamp"],"logger":"console"}
```
- Time: 09:02:46.802 AM, Cat: sentry.event, Level: error, Msg: TypeError: Expected string for username, got timestamp, Type: -
- Time: 09:02:46.793 AM, Cat: -, Level: info, Msg: User typing, Type: -
- Time: 09:00:31.789 AM, Cat: console, Level: log, Msg: Sent error: Variant: Missing '536' prop in Message component, Type: -
### Data
```json
{"arguments":["Sent error: Variant: Missing '536' prop in Message component"],"logger":"console"}
```
- Time: 09:00:31.788 AM, Cat: sentry.event, Level: error, Msg: TypeError: Variant: Missing '536' prop in Message component, Type: -
- Time: 09:00:31.786 AM, Cat: -, Level: info, Msg: Fetched chat history, Type: -
- Time: 09:00:30.766 AM, Cat: console, Level: log, Msg: Sent error: Variant: User lacks permission to send message in room 'int', Type: -
### Data
```json
{"arguments":["Sent error: Variant: User lacks permission to send message in room 'int'"],"logger":"console"}
```
- Time: 09:00:30.765 AM, Cat: sentry.event, Level: error, Msg: Error: Variant: User lacks permission to send message in room 'int', Type: -
- Time: 09:00:30.763 AM, Cat: -, Level: info, Msg: Attachment uploaded, Type: -
- Time: 09:00:29.486 AM, Cat: console, Level: log, Msg: Sent error: Variant: Missing 'int' prop in Message component, Type: -
### Data
```json
{"arguments":["Sent error: Variant: Missing 'int' prop in Message component"],"logger":"console"}
```
- Time: 09:00:29.483 AM, Cat: sentry.event, Level: error, Msg: TypeError: Variant: Missing 'int' prop in Message component, Type: -
- Time: 09:00:29.482 AM, Cat: -, Level: info, Msg: User joined room, Type: -
- Time: 09:00:27.615 AM, Cat: console, Level: log, Msg: Sent error: Expected string for username, got 17, Type: -
### Data
```json
{"arguments":["Sent error: Expected string for username, got 17"],"logger":"console"}
```
- Time: 09:00:27.611 AM, Cat: sentry.event, Level: error, Msg: TypeError: Expected string for username, got 17, Type: -
- Time: 09:00:27.608 AM, Cat: -, Level: info, Msg: Attachment uploaded, Type: -
- Time: 08:59:56.168 AM, Cat: console, Level: log, Msg: Sent error: User lacks permission to send message in room '27', Type: -
### Data
```json
{"arguments":["Sent error: User lacks permission to send message in room '27'"],"logger":"console"}
```
- Time: 08:59:56.167 AM, Cat: sentry.event, Level: error, Msg: Error: User lacks permission to send message in room '27', Type: -
- Time: 08:59:56.165 AM, Cat: -, Level: info, Msg: Message sent, Type: -
- Time: 08:59:55.644 AM, Cat: console, Level: log, Msg: Sent error: Variant: Invalid message format '46', Type: -
### Data
```json
{"arguments":["Sent error: Variant: Invalid message format '46'"],"logger":"console"}
```
- Time: 08:59:55.641 AM, Cat: sentry.event, Level: error, Msg: Error: Variant: Invalid message format '46', Type: -
- Time: 08:59:55.640 AM, Cat: -, Level: info, Msg: User joined room, Type: -
- Time: 08:59:24.698 AM, Cat: console, Level: log, Msg: Sent error: Variant: Invalid message format '40', Type: -
### Data
```json
{"arguments":["Sent error: Variant: Invalid message format '40'"],"logger":"console"}
```
- Time: 08:59:24.697 AM, Cat: sentry.event, Level: error, Msg: Error: Variant: Invalid message format '40', Type: -
- Time: 08:59:24.694 AM, Cat: -, Level: info, Msg: Fetched chat history, Type: -
- Time: 08:59:23.032 AM, Cat: console, Level: log, Msg: Sent error: Variant: API connection timed out during fetch 'timestamp', Type: -
### Data
```json
{"arguments":["Sent error: Variant: API connection timed out during fetch 'timestamp'"],"logger":"console"}
```
- Time: 08:59:23.029 AM, Cat: sentry.event, Level: error, Msg: Error: Variant: API connection timed out during fetch 'timestamp', Type: -
- Time: 08:59:23.023 AM, Cat: -, Level: info, Msg: User typing, Type: -
- Time: 08:58:52.053 AM, Cat: console, Level: log, Msg: Sent error: Message history index out of range (endpoint messages), Type: -
### Data
```json
{"arguments":["Sent error: Message history index out of range (endpoint messages)"],"logger":"console"}
```
- Time: 08:58:52.048 AM, Cat: sentry.event, Level: error, Msg: RangeError: Message history index out of range (endpoint messages), Type: -
- Time: 08:58:52.046 AM, Cat: -, Level: info, Msg: Message sent, Type: -
- Time: 08:58:51.043 AM, Cat: console, Level: log, Msg: Sent error: Invalid message format 'timestamp', Type: -
### Data
```json
{"arguments":["Sent error: Invalid message format 'timestamp'"],"logger":"console"}
```
- Time: 08:58:51.042 AM, Cat: sentry.event, Level: error, Msg: Error: Invalid message format 'timestamp', Type: -
- Time: 08:58:51.042 AM, Cat: -, Level: info, Msg: User typing, Type: -
- Time: 08:58:49.289 AM, Cat: console, Level: log, Msg: Sent error: Invalid message format 'int', Type: -
### Data
```json
{"arguments":["Sent error: Invalid message format 'int'"],"logger":"console"}
```
- Time: 08:58:49.286 AM, Cat: sentry.event, Level: error, Msg: Error: Invalid message format 'int', Type: -
- Time: 08:58:49.282 AM, Cat: -, Level: info, Msg: Message sent, Type: -
- Time: 08:58:48.647 AM, Cat: console, Level: log, Msg: Sent error: API connection timed out during fetch 'int', Type: -
### Data
```json
{"arguments":["Sent error: API connection timed out during fetch 'int'"],"logger":"console"}
```
- Time: 08:58:48.642 AM, Cat: sentry.event, Level: error, Msg: Error: API connection timed out during fetch 'int', Type: -
- Time: 08:58:48.641 AM, Cat: -, Level: info, Msg: User typing, Type: -
- Time: 08:58:47.934 AM, Cat: console, Level: log, Msg: Sent error: Message history index out of range (935 messages), Type: -
### Data
```json
{"arguments":["Sent error: Message history index out of range (935 messages)"],"logger":"console"}
```
- Time: 08:58:47.930 AM, Cat: sentry.event, Level: error, Msg: RangeError: Message history index out of range (935 messages), Type: -
- Time: 08:58:47.927 AM, Cat: -, Level: info, Msg: User joined room, Type: -
- Time: 08:58:17.355 AM, Cat: console, Level: log, Msg: Sent error: User lacks permission to send message in room 'content', Type: -
### Data
```json
{"arguments":["Sent error: User lacks permission to send message in room 'content'"],"logger":"console"}
```
- Time: 08:58:17.351 AM, Cat: sentry.event, Level: error, Msg: Error: User lacks permission to send message in room 'content', Type: -
- Time: 08:58:17.344 AM, Cat: -, Level: info, Msg: Message sent, Type: -
- Time: 08:57:16.335 AM, Cat: console, Level: log, Msg: Sent error: Variant: Message not found with ID int, Type: -
### Data
```json
{"arguments":["Sent error: Variant: Message not found with ID int"],"logger":"console"}
```
- Time: 08:57:16.335 AM, Cat: sentry.event, Level: error, Msg: Error: Variant: Message not found with ID int, Type: -
- Time: 08:57:16.334 AM, Cat: -, Level: info, Msg: Fetched chat history, Type: -
- Time: 08:57:15.572 AM, Cat: console, Level: log, Msg: Sent error: Variant: Missing 'int' prop in Message component, Type: -
### Data
```json
{"arguments":["Sent error: Variant: Missing 'int' prop in Message component"],"logger":"console"}
```
- Time: 08:57:15.571 AM, Cat: sentry.event, Level: error, Msg: TypeError: Variant: Missing 'int' prop in Message component, Type: -
- Time: 08:57:15.569 AM, Cat: -, Level: info, Msg: User joined room, Type: -
- Time: 08:57:14.084 AM, Cat: console, Level: log, Msg: Sent error: User lacks permission to send message in room 'int', Type: -
### Data
```json
{"arguments":["Sent error: User lacks permission to send message in room 'int'"],"logger":"console"}
```
- Time: 08:57:14.082 AM, Cat: sentry.event, Level: error, Msg: Error: User lacks permission to send message in room 'int', Type: -
- Time: 08:57:14.076 AM, Cat: -, Level: info, Msg: Message sent, Type: -
- Time: 08:56:11.457 AM, Cat: console, Level: log, Msg: Sent error: Expected string for username, got int, Type: -
### Data
```json
{"arguments":["Sent error: Expected string for username, got int"],"logger":"console"}
```
- Time: 08:56:11.456 AM, Cat: sentry.event, Level: error, Msg: TypeError: Expected string for username, got int, Type: -
- Time: 08:56:11.453 AM, Cat: -, Level: info, Msg: Attachment uploaded, Type: -
- Time: 08:56:10.072 AM, Cat: console, Level: log, Msg: Sent error: Expected string for username, got content, Type: -
### Data
```json
{"arguments":["Sent error: Expected string for username, got content"],"logger":"console"}
```
- Time: 08:56:10.069 AM, Cat: sentry.event, Level: error, Msg: TypeError: Expected string for username, got content, Type: -
- Time: 08:56:10.069 AM, Cat: -, Level: info, Msg: Message sent, Type: -
- Time: 08:56:08.921 AM, Cat: console, Level: log, Msg: Sent error: Expected string for username, got 932, Type: -
### Data
```json
{"arguments":["Sent error: Expected string for username, got 932"],"logger":"console"}
```
- Time: 08:56:08.917 AM, Cat: sentry.event, Level: error, Msg: TypeError: Expected string for username, got 932, Type: -
- Time: 08:56:08.917 AM, Cat: -, Level: info, Msg: Message sent, Type: -
- Time: 08:56:08.137 AM, Cat: console, Level: log, Msg: Sent error: Invalid message format 'content', Type: -
### Data
```json
{"arguments":["Sent error: Invalid message format 'content'"],"logger":"console"}
```
- Time: 08:56:08.134 AM, Cat: sentry.event, Level: error, Msg: Error: Invalid message format 'content', Type: -
- Time: 08:56:08.132 AM, Cat: -, Level: info, Msg: User joined room, Type: -
- Time: 08:56:06.816 AM, Cat: console, Level: log, Msg: Sent error: Variant: Message not found with ID timestamp, Type: -
### Data
```json
{"arguments":["Sent error: Variant: Message not found with ID timestamp"],"logger":"console"}
```
- Time: 08:56:06.815 AM, Cat: sentry.event, Level: error, Msg: Error: Variant: Message not found with ID timestamp, Type: -
- Time: 08:56:06.813 AM, Cat: -, Level: info, Msg: Attachment uploaded, Type: -
- Time: 08:56:05.719 AM, Cat: console, Level: log, Msg: Sent error: Invalid message format '465', Type: -
### Data
```json
{"arguments":["Sent error: Invalid message format '465'"],"logger":"console"}
```
- Time: 08:56:05.717 AM, Cat: sentry.event, Level: error, Msg: Error: Invalid message format '465', Type: -
- Time: 08:56:05.716 AM, Cat: -, Level: info, Msg: User joined room, Type: -
- Time: 08:56:04.319 AM, Cat: console, Level: log, Msg: Sent error: Invalid message format '476', Type: -
### Data
```json
{"arguments":["Sent error: Invalid message format '476'"],"logger":"console"}
```
- Time: 08:56:04.316 AM, Cat: sentry.event, Level: error, Msg: Error: Invalid message format '476', Type: -
- Time: 08:56:04.313 AM, Cat: -, Level: info, Msg: Attachment uploaded, Type: -
- Time: 08:55:32.737 AM, Cat: console, Level: log, Msg: Sent error: Variant: Missing '647' prop in Message component, Type: -
### Data
```json
{"arguments":["Sent error: Variant: Missing '647' prop in Message component"],"logger":"console"}
```
- Time: 08:55:32.733 AM, Cat: sentry.event, Level: error, Msg: TypeError: Variant: Missing '647' prop in Message component, Type: -
- Time: 08:55:32.732 AM, Cat: -, Level: info, Msg: Message sent, Type: -

## Tags
- app: chat_frontend
- environment: test
- technology: react
- version: 8.0.0

## Contexts
### trace
```json
{"trace_id":"ec0cca94bbd94a46958d856a78515701","span_id":"9477e0004a443922"}
```

## HTTP Request
- URL: http://localhost:8080/test.html
### Headers
```json
{"User-Agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/142.0.0.0 Safari/537.36"}
```

## User
- ID: 849
- Username: demo_user_2
- Email: demo@example.com

## Extras
- context: {"component" => "ChatHistory", "message_count" => 42}
- debug_info: {"key" => "value1"}
- request_method: GET
- url: /chat/rooms/62

## SDK
- Name: sentry.javascript.react
- Version: 8.0.0
