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

CacheFS Error #27

Open
alexkn1 opened this issue Feb 5, 2024 · 4 comments
Open

CacheFS Error #27

alexkn1 opened this issue Feb 5, 2024 · 4 comments

Comments

@alexkn1
Copy link

alexkn1 commented Feb 5, 2024

Was this tested in a library component. Typically library components don't have access to the file system.

BRIGHTSCRIPT: ERROR: roFilesystem: creating MAIN|TASK-only component failed on RENDER thread: pkg:/components/kopytko_modules/dazn_kopytkoUtils_v2/CacheFS.brs(16)

Suspending threads...
Thread selected: 1* ...n_kopytkoUtils_v2/CacheFS.brs(19) if (NOT m._fileSystem.exists(m._PREFIX + m._folder)) then m._createFolder()

@pawelhertman
Copy link
Contributor

It was never tested as a library component because, if not used with Kopytko Packager, it requires manual file imports anyway.
If you used CacheFS on the render thread, you used it incorrectly. There is a warning in the code: https://github.com/getndazn/kopytko-utils/blob/master/src/components/CacheFS.brs#L3

Summarizing, it's not an issue. //cc @bchelkowski

@alexkn1
Copy link
Author

alexkn1 commented Feb 15, 2024

@pawelhertman

I am not using it directly, I believe: ' @import /components/http/HttpService.brs from @dazn/kopytko-framework
or some other parts of the framework is using it, anyway to disable it?

m._port = CreateObject("roMessagePort")
m._httpService = HttpService(m._port)

feat!: Add HTTP request and support HTTP caching (getndazn/kopytko-framework#49) (1a09ae8), closes getndazn/kopytko-framework#49
BREAKING CHANGES (Versions Migration)
New HttpRequest node extending current base Request task node

It worked prior to this version (before 2.0)

Thanks!

@tomek-r
Copy link
Contributor

tomek-r commented Feb 15, 2024

Hi, @alexkn1 can you give some info about your use case? HttpService.brs is used with Task nodes, not on render thread.

@bchelkowski
Copy link
Member

bchelkowski commented Feb 16, 2024

Hi,

We are guessing, as there is a bit little information, but from what you wrote I assume that you are migrating kopytko-framework from v1 to v2.

In v2, the HttpRequest component has been added (that's why we marked it as a breaking change, as it could be a name that is already used in a project) and this could be your case.
If you want to use v2, you need to either change the name of your HttpRequest, or start using one from the framework (extend now your requests from HttpRequest, not the Request), the latter will require some adjustments.

The second thing is that one mentioned by Pawel and Tomek, that HttpService.brs needs to be run in a task thread. With v2 this is included in the HttpRequest Task, so it could be simply done by extending your request from HttpRequest and then calling createRequest("YourRequestExtendingKopytkoFrameworkHttpRequest").

Here is documentation related to a new HttpRequest

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

No branches or pull requests

4 participants