scramble: Document could not be loaded

Description

While attempting to access the documentation, I encountered the following error message. It’s important to note that I had been utilizing the package without any issues prior to this occurrence.

The API description document could not be fetched. This could indicate connectivity problems, or issues with the server hosting the spec.

I kindly request assistance in resolving this matter, as I need to regain access to the documentation for my ongoing work. If you require any additional details or logs to diagnose the problem, please let me know, and I will provide them promptly.

Thank you for your attention and support in resolving this issue. image

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 18 (9 by maintainers)

Most upvoted comments

Closing this issue as the problem here seems to be that /docs/api is opened using https, but the route for /docs/api.json is generated with http. Which is related to app’s config.

@romalytvynenko works! thank you. URL::forceScheme('https') (with E, if anyone stumbles here)

@slnw so for some reason, route('scramble.docs.index') returns URL with http, not https. It should’ve returned https.

I’m not sure why this happens, but to solve it you need to ensure that route('scramble.docs.index') returns https.

You can try adding this code to your AppServiceProvider:

if (config('app.env') === 'production') {
    URL::forceSchema('https');
}