Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on Updating on Netgate 4200 24.11 from v2.3.0 to v2.3.1 #633

Closed
war59312 opened this issue Jan 5, 2025 · 1 comment · Fixed by #643
Closed

Error on Updating on Netgate 4200 24.11 from v2.3.0 to v2.3.1 #633

war59312 opened this issue Jan 5, 2025 · 1 comment · Fixed by #643
Labels
documentation Improvements or additions to documentation enhancement Issues or PRs that enhance existing features

Comments

@war59312
Copy link
Contributor

war59312 commented Jan 5, 2025

Describe the bug
Updating from v2.3.0 to v2.3.1 resulted in the following error, after the update:

PHP Errors:
[05-Jan-2025 14:47:40 US/Eastern] PHP Fatal error:  Uncaught Error: Failed opening required '/usr/local/pkg/RESTAPI/Forms/SystemRESTAPIUpdatesForm.inc' (include_path='.:/etc/inc:/usr/local/pfSense/include:/usr/local/pfSense/include/www:/usr/local/www:/usr/local/captiveportal:/usr/local/pkg:/usr/local/www/classes:/usr/local/www/classes/Form:/usr/local/share/pear:/usr/local/share/openssl_x509_crl/') in /usr/local/www/system_restapi_updates.php:2
Stack trace:
#0 {main}
  thrown in /usr/local/www/system_restapi_updates.php on line 2

Despite the error, it updated fine.

To Reproduce
Steps to reproduce the behavior:

  1. Install API v2.3.0 on 24.11
  2. Upgrade API to v2.3.1 and get the error above.

Expected behavior
No error after the update.

Screenshots or Response
See the error above.

pfSense Version & Package Version:

  • pfSense Version: 24.11
  • Package Version: 2.3.1

Affected Endpoints:
n/a

Additional context
n/a

@jaredhendrickson13
Copy link
Owner

This is normal for a period of time after you initiate the update in the UI and should resolve on its own once the update completes. The update process runs in the background and part of that process is removing the previously installed package, which will temporarily remove some of the files the REST API forms need to render which will throw an error if you try to access the page in this state.

There's not a great way to prevent that entirely, but some changes could be made to hopefully shorten that window and make it more apparent that the behavior is normal for a short period of time after starting an update.

@jaredhendrickson13 jaredhendrickson13 added documentation Improvements or additions to documentation enhancement Issues or PRs that enhance existing features labels Jan 8, 2025
jaredhendrickson13 added a commit that referenced this issue Jan 11, 2025
Before, access REST API resources resulted in a PHP error traceback which could cause unnecessary concern. This change will allow both endpoints and forms to give a friendlier, more informative notice.
jaredhendrickson13 added a commit that referenced this issue Jan 19, 2025
* style: run prettier on changed files

* docs: add info about unavailability during updates #633

* fix: give friendlier error messages during updates #633

Before, access REST API resources resulted in a PHP error traceback which could cause unnecessary concern. This change will allow both endpoints and forms to give a friendlier, more informative notice.

* fix: correctly set http response code for 503s during updates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement Issues or PRs that enhance existing features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants