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: function 'execLaterFdNative' not provided by package 'later' #203

Closed
jcheng5 opened this issue Nov 27, 2024 · 3 comments · Fixed by #204
Closed

Error: function 'execLaterFdNative' not provided by package 'later' #203

jcheng5 opened this issue Nov 27, 2024 · 3 comments · Fixed by #204

Comments

@jcheng5
Copy link
Member

jcheng5 commented Nov 27, 2024

NOTICE: If you're seeing this error, install.packages("later") and restarting R should fix it. If not, please leave a comment including packageVersion("later")


This error is happening when a copy of a LinkingTo: later package (like httpuv or promises) is installed that was built against later 1.4.0, but the version of later that's actually installed is 1.3.1 or earlier.

This is not academic; it happens for many deployed Shiny apps if they are installing binary packages from CRAN or Posit Package Manager.

For example:

  1. Last week you took a snapshot of your app to create a manifest.json which contains package names and version numbers. Among the entries are httpuv 1.6.15 and later 1.3.1. All is well.
  2. Now you've updated your app logic so you redeploy. The container or whatever is rebuilt. The manifest.json hasn't changed, so httpuv 1.6.15 and later 1.3.1 are installed. But now, httpuv 1.6.15 has been rebuilt against the newest later.
  3. When httpuv goes to load, you get the above error; the inst/include/later.h is trying to load an RCCallable that doesn't exist.
@jcheng5
Copy link
Member Author

jcheng5 commented Nov 27, 2024

Easy local repro steps (using promises instead of httpuv as it's much faster to compile):

install.packages("later")
install.packages("promises", type="source")
devtools::install_version("later", "1.3.1")

Then restart R and library(promises).

@jcheng5
Copy link
Member Author

jcheng5 commented Nov 27, 2024

#204 takes the approach of looking at later's runtime API version number (kudos to @wch for adding that five years ago!).

Another option would be to leave the version number and call R_GetCCallable with error handlers. We could then reserve version number incrementing for true backwards-compatible breaking changes and simply error if there's a version mismatch.

@shikokuchuo I know it's getting late there but I'd really like to get this fixed today--do you have a moment for a quick zoom call? I can do the work but would like to have your approval on the approach.

@shikokuchuo
Copy link
Collaborator

@jcheng5 I've messaged you on Slack.

jcheng5 added a commit that referenced this issue Nov 27, 2024
…er (#204)

* Graceful later_fd fallback if later_api.h is newer than installed later

* Add comments, clearer stub function name

* GHA test for issue #203

* Intentionally break GHA test to see if it errors

* Try to fix GHA test

* Fix GHA

* FIX GHA

* Undo intentional breakage

* Add NEWS

* Apply suggestions from code review

Co-authored-by: Charlie Gao <[email protected]>

---------

Co-authored-by: Charlie Gao <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants