RodrigoMorteo opened a new issue, #3122:
URL: https://github.com/apache/apisix-dashboard/issues/3122

   ### Issue description
   
   When setting up a fresh instance of APISIX and APISIX Dashboard using Docker 
Compose, attempting to create a new Consumer or Route results in a blank page 
at the "Plugin Config" step. Same happens when cllicking on the Plugin section 
in the main menu. The browser console shows a fatal TypeError, which appears to 
be caused by an uncaught error when the dashboard's backend fails to fetch a 
global rule with ID 1 from the APISIX Admin API.
   
   When using the /plugin/list route the issue seems to be that the dashboard's 
UI expects /apisix/admin/global_rules/1 to exist, and when it receives a 404 
Not Found response, the frontend JavaScript fails and does not render the 
component, followed by a ```p__Route__Create.e49e3cfc.async.js:1  Uncaught (in 
promise) TypeError: Cannot read properties of null (reading 'find')```.
   
   The internal logs for the apisix-dashboard container show a corresponding 
warning:
   ```
   WARN store/store.go:128 data not found by key: 1
   ```
   After adding the rule the response is successful but the issue persists. 
   ```bash
   curl -i "http://127.0.0.1:9180/apisix/admin/global_rules/1"; \
   -H "X-API-KEY: [SECRET_KEY]" -X PUT \
   -d '{
       "plugins": {}
   }'```
   The response is successful: 
   ```bash
   HTTP/1.1 201 Created
   Date: Fri, 13 Jun 2025 23:59:43 GMT
   Content-Type: application/json
   Transfer-Encoding: chunked
   Connection: keep-alive
   Server: APISIX/3.12.0
   Access-Control-Allow-Origin: *
   Access-Control-Allow-Credentials: true
   Access-Control-Expose-Headers: *
   Access-Control-Max-Age: 3600
   X-API-VERSION: v3
   
   
{"value":{"plugins":{},"id":"1","create_time":1749859183,"update_time":1749859183},"key":"/apisix/global_rules/1"}
   ```
   Note that the adding routes, and consumers via API with plugins configured 
is also successful:
   ```bash
    curl -i "http://127.0.0.1:9180/apisix/admin/consumers"; \
   -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PUT \
   -d '{
       "username": "internal_services",
       "plugins": {
           "key-auth": {
               "key": "my-secret-key"
           }
       },
       "desc": "Consumer for an intra service communication"
   }'
   HTTP/1.1 201 Created
   Date: Sat, 14 Jun 2025 00:19:27 GMT
   Content-Type: application/json
   Transfer-Encoding: chunked
   Connection: keep-alive
   Server: APISIX/3.12.0
   Access-Control-Allow-Origin: *
   Access-Control-Allow-Credentials: true
   Access-Control-Expose-Headers: *
   Access-Control-Max-Age: 3600
   X-API-VERSION: v3
   
   
{"value":{"create_time":1749860367,"username":"internal_services","desc":"Consumer
 for an intra service 
communication","plugins":{"key-auth":{"key":"kK0lkbzXrE7aiTiyK/Z0Sw=="}},"update_time":1749860367},"key":"/apisix/consumers/internal_services"}
   ```
   Which means that APISIX backend is properly working.
   
   
   ### Expected behavior
   
   The list of available plugins must show in the Plugin page and on it's 
corresponding step for adding  or editing Consumers or Routes.
   
   ### How to Reproduce
   
   1.- Unzip the attached apisix config in a new folder
   2.- Run docker compose up -d
   3.- Open your browser in http://127.0.0.1:9000
   4.- Login with admin credentials
   5.- Click in the Plugin menu option
   6.- (optional) add a consumer or route and go to the plugin step.
   
   ### Screenshots
   
   
![Image](https://github.com/user-attachments/assets/b058f5cb-66de-4c25-96ee-0b76f5d85b85)
   
   
![Image](https://github.com/user-attachments/assets/69d0cb38-77a4-4e09-a641-bc811251d09a)
   
   
![Image](https://github.com/user-attachments/assets/02f63b19-6ba6-4f6e-9edc-6f464a2bee15)
   
   
![Image](https://github.com/user-attachments/assets/0914a67f-3687-4e67-bb0d-2006f19e5ea7)
   
   ### Environment
   
   - apisix version: 3.12.0
   - OS WSL Ubuntu 24.04.2 LTS
   - OpenResty / Nginx version: openresty/1.27.1.1
   - etcd version:  3.5.17
   - apisix-dashboard version: 3.0.1
   - Browser version: Edge Version 137.0.3296.68 (Official build) (64-bit) and 
Chrome Version 137.0.7151.69 (Official Build) (64-bit)
   See attached zip with configuration files and console log.
   
   
[apisix-config.zip](https://github.com/user-attachments/files/20734557/apisix-config.zip)
   
   ### Additional context
   
   The same behavior was present in x86 Ubuntu based AWS EC2 instances with 
ubuntu 24.04.02.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to