Vercel Build error occurred generating static pages - next.js

I'm trying to deploy a NextJS project to Vercel but I'm facing a problem. Any of 9 static pages are not prerendering. This is the log error:
Error occurred prerendering page "/empregados/cadastrar". Read more: https://nextjs.org/docs/messages/prerender-error
TypeError [ERR_INVALID_URL]: Invalid URL
at new NodeError (node:internal/errors:387:5)
at URL.onParseError (node:internal/url:565:9)
at parse (<anonymous>)
at new URL (node:internal/url:641:5)
at new SupabaseClient (/vercel/path0/node_modules/#supabase/supabase-js/dist/main/SupabaseClient.js:71:41)
at createClient (/vercel/path0/node_modules/#supabase/supabase-js/dist/main/index.js:35:12)
at createBrowserSupabaseClient (/vercel/path0/node_modules/#supabase/auth-helpers-shared/dist/index.js:316:46)
at createBrowserSupabaseClient (/vercel/path0/node_modules/#supabase/auth-helpers-nextjs/dist/index.js:317:70)
at /vercel/path0/.next/server/pages/_app.js:609:166
at Ic (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:59:265)
Error occurred prerendering page "/". Read more: https://nextjs.org/docs/messages/prerender-error
TypeError [ERR_INVALID_URL]: Invalid URL
at new NodeError (node:internal/errors:387:5)
at URL.onParseError (node:internal/url:565:9)
at parse (<anonymous>)
at new URL (node:internal/url:641:5)
at new SupabaseClient (/vercel/path0/node_modules/#supabase/supabase-js/dist/main/SupabaseClient.js:71:41)
at createClient (/vercel/path0/node_modules/#supabase/supabase-js/dist/main/index.js:35:12)
at createBrowserSupabaseClient (/vercel/path0/node_modules/#supabase/auth-helpers-shared/dist/index.js:316:46)
at createBrowserSupabaseClient (/vercel/path0/node_modules/#supabase/auth-helpers-nextjs/dist/index.js:317:70)
at /vercel/path0/.next/server/pages/_app.js:609:166
at Ic (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:59:265)
info - Generating static pages (2/9)
Error occurred prerendering page "/empresas-medicas/cadastrar". Read more: https://nextjs.org/docs/messages/prerender-error
TypeError [ERR_INVALID_URL]: Invalid URL
at new NodeError (node:internal/errors:387:5)
at URL.onParseError (node:internal/url:565:9)
at parse (<anonymous>)
at new URL (node:internal/url:641:5)
at new SupabaseClient (/vercel/path0/node_modules/#supabase/supabase-js/dist/main/SupabaseClient.js:71:41)
at createClient (/vercel/path0/node_modules/#supabase/supabase-js/dist/main/index.js:35:12)
at createBrowserSupabaseClient (/vercel/path0/node_modules/#supabase/auth-helpers-shared/dist/index.js:316:46)
at createBrowserSupabaseClient (/vercel/path0/node_modules/#supabase/auth-helpers-nextjs/dist/index.js:317:70)
at /vercel/path0/.next/server/pages/_app.js:609:166
at Ic (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:59:265)
Error occurred prerendering page "/medicos". Read more: https://nextjs.org/docs/messages/prerender-error
TypeError [ERR_INVALID_URL]: Invalid URL
at new NodeError (node:internal/errors:387:5)
at URL.onParseError (node:internal/url:565:9)
at parse (<anonymous>)
at new URL (node:internal/url:641:5)
at new SupabaseClient (/vercel/path0/node_modules/#supabase/supabase-js/dist/main/SupabaseClient.js:71:41)
at createClient (/vercel/path0/node_modules/#supabase/supabase-js/dist/main/index.js:35:12)
at createBrowserSupabaseClient (/vercel/path0/node_modules/#supabase/auth-helpers-shared/dist/index.js:316:46)
at createBrowserSupabaseClient (/vercel/path0/node_modules/#supabase/auth-helpers-nextjs/dist/index.js:317:70)
at /vercel/path0/.next/server/pages/_app.js:609:166
at Ic (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:59:265)
Error occurred prerendering page "/empresas-medicas". Read more: https://nextjs.org/docs/messages/prerender-error
TypeError [ERR_INVALID_URL]: Invalid URL
at new NodeError (node:internal/errors:387:5)
at URL.onParseError (node:internal/url:565:9)
at parse (<anonymous>)
at new URL (node:internal/url:641:5)
at new SupabaseClient (/vercel/path0/node_modules/#supabase/supabase-js/dist/main/SupabaseClient.js:71:41)
at createClient (/vercel/path0/node_modules/#supabase/supabase-js/dist/main/index.js:35:12)
at createBrowserSupabaseClient (/vercel/path0/node_modules/#supabase/auth-helpers-shared/dist/index.js:316:46)
at createBrowserSupabaseClient (/vercel/path0/node_modules/#supabase/auth-helpers-nextjs/dist/index.js:317:70)
at /vercel/path0/.next/server/pages/_app.js:609:166
at Ic (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:59:265)
info - Generating static pages (4/9)
info - Generating static pages (6/9)
Error occurred prerendering page "/socios/cadastrar". Read more: https://nextjs.org/docs/messages/prerender-error
TypeError [ERR_INVALID_URL]: Invalid URL
at new NodeError (node:internal/errors:387:5)
at URL.onParseError (node:internal/url:565:9)
at parse (<anonymous>)
at new URL (node:internal/url:641:5)
at new SupabaseClient (/vercel/path0/node_modules/#supabase/supabase-js/dist/main/SupabaseClient.js:71:41)
at createClient (/vercel/path0/node_modules/#supabase/supabase-js/dist/main/index.js:35:12)
at createBrowserSupabaseClient (/vercel/path0/node_modules/#supabase/auth-helpers-shared/dist/index.js:316:46)
at createBrowserSupabaseClient (/vercel/path0/node_modules/#supabase/auth-helpers-nextjs/dist/index.js:317:70)
at /vercel/path0/.next/server/pages/_app.js:609:166
at Ic (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:59:265)
Error occurred prerendering page "/404". Read more: https://nextjs.org/docs/messages/prerender-error
TypeError [ERR_INVALID_URL]: Invalid URL
at new NodeError (node:internal/errors:387:5)
at URL.onParseError (node:internal/url:565:9)
at parse (<anonymous>)
at new URL (node:internal/url:641:5)
at new SupabaseClient (/vercel/path0/node_modules/#supabase/supabase-js/dist/main/SupabaseClient.js:71:41)
at createClient (/vercel/path0/node_modules/#supabase/supabase-js/dist/main/index.js:35:12)
at createBrowserSupabaseClient (/vercel/path0/node_modules/#supabase/auth-helpers-shared/dist/index.js:316:46)
at createBrowserSupabaseClient (/vercel/path0/node_modules/#supabase/auth-helpers-nextjs/dist/index.js:317:70)
at /vercel/path0/.next/server/pages/_app.js:609:166
at Ic (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:59:265)
Error occurred prerendering page "/mudar-a-senha". Read more: https://nextjs.org/docs/messages/prerender-error
TypeError [ERR_INVALID_URL]: Invalid URL
at new NodeError (node:internal/errors:387:5)
at URL.onParseError (node:internal/url:565:9)
at parse (<anonymous>)
at new URL (node:internal/url:641:5)
at new SupabaseClient (/vercel/path0/node_modules/#supabase/supabase-js/dist/main/SupabaseClient.js:71:41)
at createClient (/vercel/path0/node_modules/#supabase/supabase-js/dist/main/index.js:35:12)
at createBrowserSupabaseClient (/vercel/path0/node_modules/#supabase/auth-helpers-shared/dist/index.js:316:46)
at createBrowserSupabaseClient (/vercel/path0/node_modules/#supabase/auth-helpers-nextjs/dist/index.js:317:70)
at /vercel/path0/.next/server/pages/_app.js:609:166
at Ic (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:59:265)
Error occurred prerendering page "/500". Read more: https://nextjs.org/docs/messages/prerender-error
at new NodeError (node:internal/errors:387:5)
at URL.onParseError (node:internal/url:565:9)
at parse (<anonymous>)
at new URL (node:internal/url:641:5)
at new SupabaseClient (/vercel/path0/node_modules/#supabase/supabase-js/dist/main/SupabaseClient.js:71:41)
at createClient (/vercel/path0/node_modules/#supabase/supabase-js/dist/main/index.js:35:12)
at createBrowserSupabaseClient (/vercel/path0/node_modules/#supabase/auth-helpers-shared/dist/index.js:316:46)
at createBrowserSupabaseClient (/vercel/path0/node_modules/#supabase/auth-helpers-nextjs/dist/index.js:317:70)
at /vercel/path0/.next/server/pages/_app.js:609:166
at Ic (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:59:265)
> Build error occurred
info - Generating static pages (9/9)
Error: Export encountered errors on following paths:
/
/_error: /404
/_error: /500
/empregados/cadastrar
/empresas-medicas
/empresas-medicas/cadastrar
/medicos
/mudar-a-senha
/socios/cadastrar
at /vercel/path0/node_modules/next/dist/export/index.js:409:19
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/trace/trace.js:79:20)
at async /vercel/path0/node_modules/next/dist/build/index.js:1345:21
at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/trace/trace.js:79:20)
at async /vercel/path0/node_modules/next/dist/build/index.js:1205:17
at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/trace/trace.js:79:20)
at async Object.build [as default] (/vercel/path0/node_modules/next/dist/build/index.js:66:29)
Error: Command "npm run build" exited with 1
Locally everything works fine and the build is successful:
npm run build
> dashboard#0.1.0 build
> next build
info - Loaded env from .env
info - Linting and checking validity of types
info - Creating an optimized production build
info - Compiled successfully
info - Collecting page data
info - Generating static pages (9/9)
info - Finalizing page optimization
Route (pages) Size First Load JS
┌ ○ / (418 ms) 332 B 213 kB
├ /_app 0 B 213 kB
├ ○ /404 181 B 213 kB
├ λ /api/contascorrente 0 B 213 kB
├ λ /api/contascorrente/[id] 0 B 213 kB
├ λ /api/documentos 0 B 213 kB
├ λ /api/empregados 0 B 213 kB
├ λ /api/empregados-observacoes 0 B 213 kB
├ λ /api/empregados-pagamentos 0 B 213 kB
├ λ /api/empregados-pagamentos/[id] 0 B 213 kB
├ λ /api/empregados/[id] 0 B 213 kB
├ λ /api/empresas-medicas 0 B 213 kB
├ λ /api/empresas-medicas/[id] 0 B 213 kB
├ λ /api/enderecos 0 B 213 kB
├ λ /api/enderecos/[id] 0 B 213 kB
├ λ /api/medicos 0 B 213 kB
├ λ /api/medicos/[id] 0 B 213 kB
├ λ /api/socios 0 B 213 kB
├ λ /api/socios/[id] 0 B 213 kB
├ λ /empregados 3.35 kB 216 kB
├ ○ /empregados/cadastrar (362 ms) 1.72 kB 250 kB
├ ○ /empresas-medicas (415 ms) 1.78 kB 227 kB
├ λ /empresas-medicas/[id] 4.3 kB 268 kB
├ ○ /empresas-medicas/cadastrar (384 ms) 1.15 kB 233 kB
├ ○ /medicos (372 ms) 1.67 kB 227 kB
├ λ /medicos/[id] 662 B 265 kB
├ ○ /mudar-a-senha (394 ms) 762 B 213 kB
├ λ /socios 3.38 kB 216 kB
├ λ /socios/[id] 1.7 kB 266 kB
└ ○ /socios/cadastrar (358 ms) 1.28 kB 233 kB
+ First Load JS shared by all 213 kB
├ chunks/framework-114634acb84f8baa.js 45.4 kB
├ chunks/main-66ca454f7bdf962f.js 27 kB
├ chunks/pages/_app-1497eacb955143f3.js 139 kB
├ chunks/webpack-36d12a75f0098f30.js 1.04 kB
└ css/2ec7a21f39c50b69.css 783 B
λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
○ (Static) automatically rendered as static HTML (uses no initial props)
Some of the pages are so simple that its codebase may not be problem, like index.tsx:
pages/index.tsx
import MainContent from "components/Containers/MainContent";
const Home = () => {
return (
<MainContent>
<h1>hello world</h1>
</MainContent>
);
};
export default Home;
So, how could I fix this problem? The build just work fine locally and I'm able to start the application without any trouble.

Related

I import a other wordpress file into my wordpress. When i import file its shows:- Fatal error: Uncaught WC_Data_Exception

Fatal error: Uncaught WC_Data_Exception: Invalid billing email address in D:\XAMPP\htdocs\wordpress\wp-content\plugins\woocommerce\includes\abstracts\abstract-wc-data.php:810 Stack trace: #0 D:\XAMPP\htdocs\wordpress\wp-content\plugins\woocommerce\includes\class-wc-customer.php(971): WC_Data->error('customer_invali...', 'Invalid billing...') #1 D:\XAMPP\htdocs\wordpress\wp-content\plugins\woocommerce\includes\data-stores\class-wc-customer-data-store-session.php(113): WC_Customer->set_billing_email('admin1#localhos...') #2 D:\XAMPP\htdocs\wordpress\wp-content\plugins\woocommerce\includes\class-wc-data-store.php(159): WC_Customer_Data_Store_Session->read(Object(WC_Customer)) #3 D:\XAMPP\htdocs\wordpress\wp-content\plugins\woocommerce\includes\class-wc-customer.php(116): WC_Data_Store->read(Object(WC_Customer)) #4 D:\XAMPP\htdocs\wordpress\wp-content\plugins\woocommerce\includes\class-woocommerce.php(757): WC_Customer->__construct(6, true) #5 D:\XAMPP\htdocs\wordpress\wp-content\plugins\woocommerce\includes\wc-core-functions in D:\XAMPP\htdocs\wordpress\wp-content\plugins\woocommerce\includes\abstracts\abstract-wc-data.php on line 810

Next-Auth : defaultCookies is not defined

I'm using next/auth version: 3.27.3
I suddenly got this error while running my app. Anyone encountered this?
error - unhandledRejection: ReferenceError: defaultCookies is not defined
at C:\Users\MAGICSOFT Mike\Desktop\NEW MAGICSOFT\crd-prototype\node_modules\next-auth\dist\server\index.js:102:9
at new Promise (<anonymous>)
at NextAuthHandler (C:\Users\MAGICSOFT Mike\Desktop\NEW MAGICSOFT\crd-prototype\node_modules\next-auth\dist\server\index.js:67:10)
at NextAuth (C:\Users\MAGICSOFT Mike\Desktop\NEW MAGICSOFT\crd-prototype\node_modules\next-auth\dist\server\index.js:299:10)
at __WEBPACK_DEFAULT_EXPORT__ (C:\Users\MAGICSOFT Mike\Desktop\NEW MAGICSOFT\crd-prototype\.next\server\pages\api\auth\[...nextauth].js:188:128)
at Object.apiResolver (C:\Users\MAGICSOFT Mike\Desktop\NEW MAGICSOFT\crd-prototype\node_modules\next\dist\server\api-utils.js:101:15)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async DevServer.handleApiRequest (C:\Users\MAGICSOFT Mike\Desktop\NEW MAGICSOFT\crd-prototype\node_modules\next\dist\server\next-server.js:775:9)
at async Object.fn (C:\Users\MAGICSOFT Mike\Desktop\NEW MAGICSOFT\crd-prototype\node_modules\next\dist\server\next-server.js:666:37)
Seems like changing the next-auth version on your package.json file solves this issue.
For my case, changing from version "^3.29.0" to "3.29.3" solved the issue.

Vercel / Next.js - Error occurred prerendering page "/" - Deployment issue

I wonder if you can help me - I have been following a tutorial and everything was going okay until I tried to deploy on Vercel. Basically, it shows this error at me:
Cloning completed: 625.351ms
Analyzing source code...
Installing build runtime...
Build runtime installed: 2.594s
No Build Cache available
Installing dependencies...
Detected `package-lock.json` generated by npm 7...
npm WARN deprecated next-google-fonts#2.2.0: As of Next.js 10.2, Google Fonts are automatically optimized! For more info, see https://github.com/joe-bell/next-google-fonts
added 475 packages in 17s
70 packages are looking for funding
run `npm fund` for details
Detected Next.js version: 12.0.9
Detected `package-lock.json` generated by npm 7...
Running "npm run build"
> build
> next build
Attention: Next.js now collects completely anonymous telemetry regarding usage.
This information is used to shape Next.js' roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://nextjs.org/telemetry
info - Checking validity of types...
info - Creating an optimized production build...
info - Disabled SWC as replacement for Babel because of custom Babel configuration ".babelrc" https://nextjs.org/docs/messages/swc-disabled
info - Using external babel configuration from /vercel/path0/.babelrc
info - Compiled successfully
info - Collecting page data...
info - Generating static pages (0/3)
Error occurred prerendering page "/". Read more: https://nextjs.org/docs/messages/prerender-error
Error: Request failed with status code 400
at settle (/vercel/path0/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/vercel/path0/node_modules/axios/lib/adapters/http.js:312:11)
at IncomingMessage.emit (events.js:412:35)
at endReadableNT (internal/streams/readable.js:1334:12)
at processTicksAndRejections (internal/process/task_queues.js:82:21)
info - Generating static pages (3/3)
> Build error occurred
Error: Export encountered errors on following paths:
/
at /vercel/path0/node_modules/next/dist/export/index.js:499:19
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/trace/trace.js:75:20)
at async /vercel/path0/node_modules/next/dist/build/index.js:1005:17
at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/trace/trace.js:75:20)
at async /vercel/path0/node_modules/next/dist/build/index.js:879:13
at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/trace/trace.js:75:20)
at async Object.build [as default] (/vercel/path0/node_modules/next/dist/build/index.js:82:25)
Error: Command "npm run build" exited with 1
Here is what happens when I run, npm run build :
info - Checking validity of types
info - Disabled SWC as replacement for Babel because of custom Babel configuration ".babelrc" https://nextjs.org/docs/messages/swc-disabled
info - Using external babel configuration from /Users/musa/Dev/projects/real-estate-app/.babelrc
info - Creating an optimized production build
info - Compiled successfully
info - Collecting page data
info - Generating static pages (3/3)
info - Finalizing page optimization
Page Size First Load JS
┌ ● / (5492 ms) 1.91 kB 195 kB
├ /_app 0 B 186 kB
├ ○ /404 1.36 kB 187 kB
├ λ /api/hello 0 B 186 kB
├ λ /property/[id] 7.08 kB 201 kB
└ λ /search 5.34 kB 199 kB
+ First Load JS shared by all 186 kB
├ chunks/framework-91d7f78b5b4003c8.js 42 kB
├ chunks/main-629582258d0e4696.js 24.9 kB
├ chunks/pages/_app-ce65d5b2019d69ca.js 118 kB
└ chunks/webpack-3afb6060a90456f3.js 1.53 kB
λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
○ (Static) automatically rendered as static HTML (uses no initial props)
● (SSG) automatically generated as static HTML + JSON (uses getStaticProps)
Here is the index.js:
import { Box, Flex } from "#chakra-ui/react";
import Banner from "../components/Banner";
import Property from "../components/Property";
import { baseUrl, fetchApi } from "../utils/fetchApi";
const Home = ({ propertiesForSale, propertiesForRent }) => (
<Box>
<Banner
purpose="Rent a Home"
title1="Rental Homes for"
title2="Everyone"
desc1="Explore Apartments, Villas, Homes"
desc2="and more"
buttonText="Explore Renting"
linkName="/search?purpose=for-rent"
imageUrl="https://bayut-production.s3.eu-central-1.amazonaws.com/image/145426814/33973352624c48628e41f2ec460faba4"
/>
<Flex flexWrap="wrap" justifyContent="center" alignItems="center">
{propertiesForRent.map((property) => (
<Property property={property} key={property.id} />
))}
</Flex>
<Banner
purpose="BUY A HOME"
title1=" Find, Buy & Own Your"
title2="Dream Home"
desc1=" Explore from Apartments, land, builder floors,"
desc2=" villas and more"
buttonText="Explore Buying"
linkName="/search?purpose=for-sale"
imageUrl="https://bayut-production.s3.eu-central-1.amazonaws.com/image/110993385/6a070e8e1bae4f7d8c1429bc303d2008"
/>
<Flex flexWrap="wrap" justifyContent="center" alignItems="center">
{propertiesForSale.map((property) => (
<Property property={property} key={property.id} />
))}
</Flex>
</Box>
);
export async function getStaticProps() {
const propertyForSale = await fetchApi(
`${baseUrl}/properties/list?locationExternalIDs=5002&purpose=for-sale&hitsPerPage=6`
);
const propertyForRent = await fetchApi(
`${baseUrl}/properties/list?locationExternalIDs=5002&purpose=for-rent&hitsPerPage=6`
);
return {
props: {
propertiesForSale: propertyForSale?.hits,
propertiesForRent: propertyForRent?.hits,
},
};
}
export default Home;
Pages:
📦pages
┣ 📂api
┃ ┗ 📜hello.js
┣ 📂property
┃ ┗ 📜[id].js
┣ 📜_app.js
┣ 📜_document.js
┣ 📜index.js
┗ 📜search.js
Already went to this link:
https://nextjs.org/docs/messages/prerender-error#possible-ways-to-fix-it
Thank you in Advance :D
Vercel cannot reach
fetchApi(${baseUrl}/properties/list?locationExternalIDs=5002&purpose=for->sale&hitsPerPage=6)
Verify that the API you are calling is reachable from outside of your local machine.

Openstack Watcher complains about endpoint not found even though it is defined in the catalog

I have the following scenario:
server: Ubuntu 20.04.3 LTS
Openstack: installed following the official guide
Watcher: 1:4.0.0-0ubuntu0.20.04.1 (installed also following the official wiki)
Everything works like a charm, however, when I run
root#controller:/etc/watcher# openstack optimize service list
Internal Server Error (HTTP 500)
root#controller:/etc/watcher#
and checked what is it about on watcher's log
2022-01-15 17:25:58.509 17960 INFO watcher-api [-] 10.0.0.11 "GET /v1/services HTTP/1.1" status: 500 len: 139 time: 0.0277412
2022-01-15 17:40:52.535 17960 INFO watcher-api [-] Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/eventlet/wsgi.py", line 573, in handle_one_response
result = self.application(self.environ, start_response)
File "/usr/lib/python3/dist-packages/watcher/api/app.py", line 58, in __call__
return self.v1(environ, start_response)
File "/usr/lib/python3/dist-packages/watcher/api/middleware/auth_token.py", line 61, in __call__
return super(AuthTokenMiddleware, self).__call__(env, start_response)
File "/usr/local/lib/python3.8/dist-packages/webob/dec.py", line 129, in __call__
resp = self.call_func(req, *args, **kw)
File "/usr/local/lib/python3.8/dist-packages/webob/dec.py", line 193, in call_func
return self.func(req, *args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/keystonemiddleware/auth_token/__init__.py", line 338, in __call__
response = self.process_request(req)
File "/usr/local/lib/python3.8/dist-packages/keystonemiddleware/auth_token/__init__.py", line 659, in process_request
resp = super(AuthProtocol, self).process_request(request)
File "/usr/local/lib/python3.8/dist-packages/keystonemiddleware/auth_token/__init__.py", line 409, in process_request
data, user_auth_ref = self._do_fetch_token(
File "/usr/local/lib/python3.8/dist-packages/keystonemiddleware/auth_token/__init__.py", line 445, in _do_fetch_token
data = self.fetch_token(token, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/keystonemiddleware/auth_token/__init__.py", line 752, in fetch_token
data = self._identity_server.verify_token(
File "/usr/local/lib/python3.8/dist-packages/keystonemiddleware/auth_token/_identity.py", line 157, in verify_token
auth_ref = self._request_strategy.verify_token(
File "/usr/local/lib/python3.8/dist-packages/keystonemiddleware/auth_token/_identity.py", line 108, in _request_strategy
strategy_class = self._get_strategy_class()
File "/usr/local/lib/python3.8/dist-packages/keystonemiddleware/auth_token/_identity.py", line 130, in _get_strategy_class
if self._adapter.get_endpoint(version=klass.AUTH_VERSION):
File "/usr/local/lib/python3.8/dist-packages/keystoneauth1/adapter.py", line 291, in get_endpoint
return self.session.get_endpoint(auth or self.auth, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/keystoneauth1/session.py", line 1233, in get_endpoint
return auth.get_endpoint(self, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/keystoneauth1/identity/base.py", line 375, in get_endpoint
endpoint_data = self.get_endpoint_data(
File "/usr/local/lib/python3.8/dist-packages/keystoneauth1/identity/base.py", line 275, in get_endpoint_data
endpoint_data = service_catalog.endpoint_data_for(
File "/usr/local/lib/python3.8/dist-packages/keystoneauth1/access/service_catalog.py", line 462, in endpoint_data_for
raise exceptions.EndpointNotFound(msg)
keystoneauth1.exceptions.catalog.EndpointNotFound: internal endpoint for identity service in regionOne region not found
and the request on the webserver side
==> horizon_access.log <==
127.0.0.1 - - [15/Jan/2022:17:38:29 +0300] "GET /dashboard/project/api_access/view_credentials/ HTTP/1.1" 200 1027 "http://localhost/dashboard/project/api_access/" "Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
10.0.0.11 - - [15/Jan/2022:17:38:30 +0300] "GET /identity/v3/auth/tokens HTTP/1.1" 200 5318 "-" "python-keystoneclient"
10.0.0.11 - - [15/Jan/2022:17:38:30 +0300] "GET /compute/v2.1/servers/detail?all_tenants=True&changes-since=2022-01-15T14%3A33%3A30.416004%2B00%3A00 HTTP/1.1" 200 433 "-" "python-novaclient"
10.0.0.11 - - [15/Jan/2022:17:40:52 +0300] "GET /identity HTTP/1.1" 300 569 "-" "openstacksdk/0.50.0 keystoneauth1/4.2.1 python-requests/2.23.0 CPython/3.8.10"
10.0.0.11 - - [15/Jan/2022:17:40:52 +0300] "POST /identity/v3/auth/tokens HTTP/1.1" 201 5316 "-" "openstacksdk/0.50.0 keystoneauth1/4.2.1 python-requests/2.23.0 CPython/3.8.10"
10.0.0.11 - - [15/Jan/2022:17:40:52 +0300] "POST /identity/v3/auth/tokens HTTP/1.1" 201 5320 "-" "watcher/unknown keystonemiddleware.auth_token/9.1.0 keystoneauth1/4.2.1 python-requests/2.23.0 CPython/3.8.10"
and on keystone side - I run it with some verbosity using the following command
/usr/bin/uwsgi --procname-prefix keystone --ini /etc/keystone/keystone-uwsgi-public.ini
I got the following log
DEBUG keystone.server.flask.request_processing.req_logging [None req-e422207d-b376-4e97-b20b-1d16144be4db None None] REQUEST_METHOD: `GET` {{(pid=20441) log_request_info /opt/stack/keystone/keystone/server/flask/request_processing/req_logging.py:27}}
DEBUG keystone.server.flask.request_processing.req_logging [None req-e422207d-b376-4e97-b20b-1d16144be4db None None] SCRIPT_NAME: `/identity` {{(pid=20441) log_request_info /opt/stack/keystone/keystone/server/flask/request_processing/req_logging.py:28}}
DEBUG keystone.server.flask.request_processing.req_logging [None req-e422207d-b376-4e97-b20b-1d16144be4db None None] PATH_INFO: `/` {{(pid=20441) log_request_info /opt/stack/keystone/keystone/server/flask/request_processing/req_logging.py:29}}
[pid: 20441|app: 0|req: 1/1] 10.0.0.11 () {58 vars in 998 bytes} [Sat Jan 15 17:44:30 2022] GET /identity => generated 268 bytes in 5 msecs (HTTP/1.1 300) 6 headers in 232 bytes (1 switches on core 0)
DEBUG keystone.server.flask.request_processing.req_logging [None req-cc547fb9-886e-4ed2-a3be-7e043004eed8 None None] REQUEST_METHOD: `POST` {{(pid=20440) log_request_info /opt/stack/keystone/keystone/server/flask/request_processing/req_logging.py:27}}
DEBUG keystone.server.flask.request_processing.req_logging [None req-cc547fb9-886e-4ed2-a3be-7e043004eed8 None None] SCRIPT_NAME: `/identity` {{(pid=20440) log_request_info /opt/stack/keystone/keystone/server/flask/request_processing/req_logging.py:28}}
DEBUG keystone.server.flask.request_processing.req_logging [None req-cc547fb9-886e-4ed2-a3be-7e043004eed8 None None] PATH_INFO: `/v3/auth/tokens` {{(pid=20440) log_request_info /opt/stack/keystone/keystone/server/flask/request_processing/req_logging.py:29}}
DEBUG oslo_db.sqlalchemy.engines [None req-cc547fb9-886e-4ed2-a3be-7e043004eed8 None None] MySQL server mode set to STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_ENGINE_SUBSTITUTION {{(pid=20440) _check_effective_sql_mode /usr/local/lib/python3.8/dist-packages/oslo_db/sqlalchemy/engines.py:304}}
DEBUG passlib.handlers.bcrypt [None req-cc547fb9-886e-4ed2-a3be-7e043004eed8 None None] detected 'bcrypt' backend, version '3.2.0' {{(pid=20440) _load_backend_mixin /usr/local/lib/python3.8/dist-packages/passlib/handlers/bcrypt.py:567}}
DEBUG passlib.handlers.bcrypt [None req-cc547fb9-886e-4ed2-a3be-7e043004eed8 None None] 'bcrypt' backend lacks $2$ support, enabling workaround {{(pid=20440) _finalize_backend_mixin /usr/local/lib/python3.8/dist-packages/passlib/handlers/bcrypt.py:382}}
DEBUG keystone.auth.core [None req-cc547fb9-886e-4ed2-a3be-7e043004eed8 None None] MFA Rules not processed for user `97eec1465cdc4e41b5c0ba48a1b39cc2`. Rule list: `[]` (Enabled: `True`). {{(pid=20440) check_auth_methods_against_rules /opt/stack/keystone/keystone/auth/core.py:438}}
DEBUG keystone.common.fernet_utils [None req-cc547fb9-886e-4ed2-a3be-7e043004eed8 None None] Loaded 2 Fernet keys from /etc/keystone/fernet-keys/, but `[fernet_tokens] max_active_keys = 3`; perhaps there have not been enough key rotations to reach `max_active_keys` yet? {{(pid=20440) load_keys /opt/stack/keystone/keystone/common/fernet_utils.py:286}}
[pid: 20440|app: 0|req: 1/2] 10.0.0.11 () {62 vars in 1095 bytes} [Sat Jan 15 17:44:30 2022] POST /identity/v3/auth/tokens => generated 4862 bytes in 125 msecs (HTTP/1.1 201) 6 headers in 385 bytes (1 switches on core 0)
DEBUG keystone.server.flask.request_processing.req_logging [None req-0584fbcc-66c5-4fba-9d8a-ea8ad2d40c5d None None] REQUEST_METHOD: `GET` {{(pid=20441) log_request_info /opt/stack/keystone/keystone/server/flask/request_processing/req_logging.py:27}}
DEBUG keystone.server.flask.request_processing.req_logging [None req-0584fbcc-66c5-4fba-9d8a-ea8ad2d40c5d None None] SCRIPT_NAME: `/identity` {{(pid=20441) log_request_info /opt/stack/keystone/keystone/server/flask/request_processing/req_logging.py:28}}
DEBUG keystone.server.flask.request_processing.req_logging [None req-0584fbcc-66c5-4fba-9d8a-ea8ad2d40c5d None None] PATH_INFO: `/` {{(pid=20441) log_request_info /opt/stack/keystone/keystone/server/flask/request_processing/req_logging.py:29}}
[pid: 20441|app: 0|req: 2/3] 10.0.0.11 () {58 vars in 1033 bytes} [Sat Jan 15 17:44:30 2022] GET /identity => generated 268 bytes in 2 msecs (HTTP/1.1 300) 6 headers in 232 bytes (1 switches on core 0)
DEBUG keystone.server.flask.request_processing.req_logging [None req-f096d017-66d0-4baa-8414-2596d0869005 None None] REQUEST_METHOD: `POST` {{(pid=20440) log_request_info /opt/stack/keystone/keystone/server/flask/request_processing/req_logging.py:27}}
DEBUG keystone.server.flask.request_processing.req_logging [None req-f096d017-66d0-4baa-8414-2596d0869005 None None] SCRIPT_NAME: `/identity` {{(pid=20440) log_request_info /opt/stack/keystone/keystone/server/flask/request_processing/req_logging.py:28}}
DEBUG keystone.server.flask.request_processing.req_logging [None req-f096d017-66d0-4baa-8414-2596d0869005 None None] PATH_INFO: `/v3/auth/tokens` {{(pid=20440) log_request_info /opt/stack/keystone/keystone/server/flask/request_processing/req_logging.py:29}}
DEBUG keystone.auth.core [None req-f096d017-66d0-4baa-8414-2596d0869005 None None] MFA Rules not processed for user `c5c42a1a942e48fd9b735ea9c6a11ed0`. Rule list: `[]` (Enabled: `True`). {{(pid=20440) check_auth_methods_against_rules /opt/stack/keystone/keystone/auth/core.py:438}}
DEBUG keystone.common.fernet_utils [None req-f096d017-66d0-4baa-8414-2596d0869005 None None] Loaded 2 Fernet keys from /etc/keystone/fernet-keys/, but `[fernet_tokens] max_active_keys = 3`; perhaps there have not been enough key rotations to reach `max_active_keys` yet? {{(pid=20440) load_keys /opt/stack/keystone/keystone/common/fernet_utils.py:286}}
[pid: 20440|app: 0|req: 2/4] 10.0.0.11 () {62 vars in 1130 bytes} [Sat Jan 15 17:44:30 2022] POST /identity/v3/auth/tokens => generated 4866 bytes in 26 msecs (HTTP/1.1 201) 6 headers in 385 bytes (2 switches on core 0)
So the first thing I did is to check the catalog
openstack catalog list
----
| keystone | identity | RegionOne |
| | | internal: http://controller/identity |
| | | RegionOne |
| | | public: http://controller/identity |
| | | RegionOne |
| | | admin: http://controller/identity |
| | | |
---
My question is: do I need to create a specific (another) internal endpoint for the identity service and where should I declare it for the watcher-api to find it?
EDIT: Following #Larsks comment, I changed the credentials used on watcher.conf by username=admin (the admin user) and the corresponding password. Openstack optimize service list gave back the following
WARNING keystonemiddleware.auth_token [-] Identity response: {"error":{"code":401,"message":"The request you have made requires authentication.","title":"Unauthorized"}}
: keystoneauth1.exceptions.http.Unauthorized: The request you have made requires authentication. (HTTP 401) (Request-ID: req-56b63a60-1ba2-4f12-93c0-e7c7d1a1769c)
2022-01-15 19:04:17.424 28742 CRITICAL keystonemiddleware.auth_token [-] Unable to validate token: Identity server rejected authorization necessary to fetch token data: keystonemiddleware.auth_token._exceptions.ServiceError: Identity server rejected authorization necessary to fetch token data

angular 2 async route module + entryComponents

I have an async loaded module with async route functionallity in angular 2. In the main module I have an implementation which uses the component factory to instantiate the component I added to the async module with entryComponents.
When I now try to instantiate it, I get the following error:
Error: No component factory found for InEntryComponentsComponent. Did you add it to #NgModule.entryComponents?
at NoComponentFactoryError.ZoneAwareError (http://localhost:3000/polyfills.dll.js:4731:33)
at NoComponentFactoryError.BaseError [as constructor] (http://localhost:3000/vendor.dll.js:28595:16)
at new NoComponentFactoryError (http://localhost:3000/vendor.dll.js:28716:16)
at _NullComponentFactoryResolver.resolveComponentFactory (http://localhost:3000/vendor.dll.js:28733:15)
at AppModuleInjector.CodegenComponentFactoryResolver.resolveComponentFactory (http://localhost:3000/vendor.dll.js:28777:35)
at SwapComponentDirective.set [as swapCmp] (http://localhost:3000/main.bundle.js:2959:66)
at Wrapper_SwapComponentDirective.check_swapCmp (/ModalModule/SwapComponentDirective/wrapper.ngfactory.js:50:26)
at View_ModalOverlay2.detectChangesInternal (/ModalModule/ModalOverlay/component.ngfactory.js:83:36)
at View_ModalOverlay2.AppView.detectChanges (http://localhost:3000/vendor.dll.js:79810:14)
at View_ModalOverlay2.DebugAppView.detectChanges (http://localhost:3000/vendor.dll.js:80005:44)
at ViewContainer.detectChangesInNestedViews (http://localhost:3000/vendor.dll.js:80143:37)
at CompiledTemplate.proxyViewClass.View_ModalOverlay_Host0.detectChangesInternal (/ModalModule/ModalOverlay/host.ngfactory.js:32:14)
at CompiledTemplate.proxyViewClass.AppView.detectChanges (http://localhost:3000/vendor.dll.js:79810:14)
at CompiledTemplate.proxyViewClass.DebugAppView.detectChanges (http://localhost:3000/vendor.dll.js:80005:44)
at ViewContainer.detectChangesInNestedViews (http://localhost:3000/vendor.dll.js:80143:37)
at CompiledTemplate.proxyViewClass.View_AppComponent_Host0.detectChangesInternal (/AppModule/AppComponent/host.ngfactory.js:31:14)
at CompiledTemplate.proxyViewClass.AppView.detectChanges (http://localhost:3000/vendor.dll.js:79810:14)
at CompiledTemplate.proxyViewClass.DebugAppView.detectChanges (http://localhost:3000/vendor.dll.js:80005:44)
at ViewRef_.detectChanges (http://localhost:3000/vendor.dll.js:59572:20)
at http://localhost:3000/vendor.dll.js:40308:67
at Array.forEach (native)
at ApplicationRef_.tick (http://localhost:3000/vendor.dll.js:40308:25)
at http://localhost:3000/vendor.dll.js:40227:105
at ZoneDelegate.invoke (http://localhost:3000/polyfills.dll.js:4162:26)
at Object.onInvoke (http://localhost:3000/vendor.dll.js:30260:37)
at ZoneDelegate.invoke (http://localhost:3000/polyfills.dll.js:4161:32)
at Zone.run (http://localhost:3000/polyfills.dll.js:4033:43)
at NgZone.run (http://localhost:3000/vendor.dll.js:30129:62)
at Object.next (http://localhost:3000/vendor.dll.js:40227:81)
at SafeSubscriber.schedulerFn [as _next] (http://localhost:3000/vendor.dll.js:42094:52)
at SafeSubscriber.__tryOrUnsub (http://localhost:3000/vendor.dll.js:591:16)
at SafeSubscriber.next (http://localhost:3000/vendor.dll.js:540:22)
at Subscriber._next (http://localhost:3000/vendor.dll.js:493:26)
at Subscriber.next (http://localhost:3000/vendor.dll.js:457:18)
at EventEmitter.Subject.next (http://localhost:3000/vendor.dll.js:4237:25)
at EventEmitter.emit (http://localhost:3000/vendor.dll.js:42080:76)
at NgZone.checkStable (http://localhost:3000/vendor.dll.js:30225:40)
at NgZone.onLeave (http://localhost:3000/vendor.dll.js:30301:14)
at Object.onInvokeTask (http://localhost:3000/vendor.dll.js:30254:27)
at ZoneDelegate.invokeTask (http://localhost:3000/polyfills.dll.js:4194:40)
at Zone.runTask (http://localhost:3000/polyfills.dll.js:4071:47)
at HTMLButtonElement.ZoneTask.invoke (http://localhost:3000/polyfills.dll.js:4265:33)
Anyone an idea how to get this running? When I move the component to a module which is not async loaded, then all is fine.
As a base I'm using the angular2-webpack-starter.

Resources