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

'class view() does not exist' error when bootstrap/cache is not present or writable #17969

Closed
macdabby opened this issue Feb 17, 2017 · 8 comments

Comments

@macdabby
Copy link
Contributor

  • Laravel Version: 5.4
  • PHP Version: hhvm 3.15.4
  • Database Driver & Version:

Description:

There is a required directory bootstrap/cache that is required. This is documented in the upgrade docs. However we use a build process that goes through jenkins and at some point the directory became unwritable. This took a very long time to debug, because the only error was 'class view() does not exist'. When a directory like that is required, there should be logic to present an error when writing to that directory fails.

Steps To Reproduce:

Delete the cache folder or make it unwritable.

@themsaid
Copy link
Member

Delete the cache folder or make it unwritable.

why?

@macdabby
Copy link
Contributor Author

Of course you would never do that. But in pushing the code to a repo, where it is pulled by jenkins and deployed to a server - somewhere along that path the directory becomes unwritable. It took several hours to debug because the error message is meaningless in relation to the actual problem.

@themsaid
Copy link
Member

somewhere along that path the directory becomes unwritable

But it has to be writable for the framework to operate, I'm not sure what you're asking, where's the bug? can you please clarify?

@macdabby
Copy link
Contributor Author

Yes, it needs to be writable. But if there is a problem in build/deploy where it becomes unwritable, there is nothing telling you that it's not unwritable. All i'm asking for is a more descriptive error message that points to the problem, so it can be fixed.

@themsaid
Copy link
Member

The error I receive is something like file_put_contents(/.../bootstrap/cache/services.php): failed to open stream: No such file or directory. I think it says it all.

Please let me know how can I generate your issue

@macdabby
Copy link
Contributor Author

I believe that error is a warning and does not stop execution of the script. It could be that my production server is set to only log more severe errors than warnings, and this only happened on my production server. If it's absolutely imperative that this directory be writable, then IMO this warrants a higher level error like a fatal. Instead, it proceeds to the next fatal which is directly caused by the directory not being writable, but has no indication of that being the case.

@themsaid
Copy link
Member

Ok, so I think it's ok to close the issue since it's not a specific issue in the core. Feel free to ping me though if you think there's something that needs to be changed, or feel free to open a PR.

@laayis
Copy link

laayis commented Dec 18, 2017

Was the solution found?

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

3 participants