False positive FES warning for loadModel(path, callback)
Maintainer thường phản hồi trong vòng 3 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 62/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript
- Lĩnh vực
- developer-experience
Hướng nghiên cứu
Cảnh báo đến từ các kiểm tra đối số của Friendly Error System cho loadModel(). Hãy bắt đầu từ đó và tìm nhánh mong đợi một chuỗi làm tham số thứ hai. So sánh nó với bản sửa trong PR #9286, bản này xử lý loadModel(path, true), và làm cho dạng có callback vượt qua cùng kiểm tra đó. Hoàn thành khi loadModel(path, callback) với một callback hợp lệ không ghi cảnh báo FES nào, còn loadModel(path, true) vẫn hoạt động như trước.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Most appropriate sub-area of p5.js?
- Accessibility
- Color
- Core/Environment/Rendering
- Data
- DOM
- Events
- Image
- IO
- Math
- Typography
- Utilities
- WebGL
- WebGPU
- p5.strands
- Build process
- Unit testing
- Internationalization
- Friendly errors
- Other (specify if possible)
p5.js version
2.3.4
Web browser and version
Google Chrome 155.0.8059.40 (Official Build) (64-bit)
Operating system
Windows 11 Version 25H2 (Build 26200.9457)
Steps to reproduce this
Steps:
- Open the p5.js Web Editor.
- Upload a valid
teapot.objfile into anassetsfolder in the sketch. - Run the following sketch and check the console.
Snippet:
let teapot;
function setup() {
createCanvas(400, 400, WEBGL);
loadModel("/assets/teapot.obj", function (modelData) {
teapot = modelData;
console.log("Model loaded successfully:", modelData);
});
}
function draw() {
background(220);
orbitControl();
normalMaterial();
if (teapot) {
scale(2);
model(teapot);
}
}
Expected behavior
Calling loadModel(path, callback) with a valid callback should not produce a Friendly Error System (FES) warning.
Actual behavior
The model loads and renders successfully, and the callback executes. However, FES reports:
p5.js says: Expected string at the second parameter in loadModel().
This appears to be a false positive because the callback is a valid second argument for this overload.
Additional context
This is a follow-up to Issue #9176 and it's fix PR #9286 , which addressed the false-positive FES warning for loadModel(path, true).
The callback overload loadModel(path, callback) still produces a similar warning after that fix. I reproduced this behavior in the p5.js Web Editor using a local OBJ file.
I'd like to work on this issue if approved. Could a maintainer please review it and assign it to me if appropriate?
Screenshot of Issue Visually
- Ngôn ngữ chính
- JavaScript
- Star
- 24.1k
- Fork
- 3.9k
- Merge trung bình
- 2 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 38
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của processing/p5.js
-
Area:WebGL p5.js 2.0+
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
processing/p5.js#9302 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
[p5.js 2.0+ Bug Report]: key docs needs updatingCó thể đã có người làm @MannXo đã nhận hôm nay. Đang mởHelp Wanted
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
processing/p5.js#9296 · 5 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Add unit tests for noiseDetail()Có thể đã có người làm @harshiltewari2004 đã nhận 3 ngày trước. Đang mởArea:Math Enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
processing/p5.js#9253 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 3 ngày
-
[p5.js 2.0+ Bug Report]: storeItem() validation branches are missing `return`, so bad input throws a TypeError or is stored anywayCó thể đã có người làm @iUjjwalRaj đã nhận 10 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
processing/p5.js#9242 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
[p5.js 2.0+ Bug Report]: getURLParams() mis-parses valueless parameters and never percent-decodes valuesCó thể đã có người làm @mayanksingh-7974 đã nhận 5 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
processing/p5.js#9241 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của processing/p5.js
Issue tương tự
-
change request evaluating
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
sindresorhus/eslint-plugin-unicorn#3907 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Android bug feature/error-tracking react-native team/error-tracking
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
PostHog/posthog-js#5310 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add Prettier and a format-check CI jobCó thể đã có người làm @ezekielnathaniel070-ai đã nhận hôm nay. Đang mởbackend frontend good first issue Stellar Wave
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
OlaGreat/starbound-realms#98 · 1 bình luận ·
-
Add AudiobookshelfĐang mởapp request good first issue help wanted self-hosted app
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Secra-Solutions/Conector#15 ·
-
Complexity: See issue making label epic good first issue Issue Making: Level 1 P-Feature: Project Info and Page role: back end/devOps role: front end size: 0.25pt time sensitive
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày