Related
I’ve been working on my project as usual, it was working fine. When I tried to do gatsby build it got this error message:
ReferenceError: Cannot access '_404' before initialization
and
ReferenceError: Cannot access '_mdx_slug_' before initialization
I haven’t added anything that should cause this, though I don’t really understand where the problem is coming from. It seems to refer to the way gatsby builds the pages of the website but I’m not experienced enough to know for sure.
gatsby build full:
success load gatsby config - 0.041s
success load plugins - 0.757s
success onPreInit - 0.029s
success initialize cache - 0.046s
success copy gatsby files - 0.183s
success Compiling Gatsby Functions - 0.185s
success onPreBootstrap - 0.201s
success createSchemaCustomization - 0.011s
success Checking for changed pages - 0.001s
success source and transform nodes - 0.511s
info Writing GraphQL type definitions to /home/daniel_gray/GatsbyProjects/watchsdarot/.cache/schema.gql
warn There are conflicting field types in your data.
If you have explicitly defined a type for those fields, you can safely ignore this warning message.
Otherwise, Gatsby will omit those fields from the GraphQL schema.
If you know all field types in advance, the best strategy is to explicitly define them with the `createTypes` action, and skip inference with the `#dontInfer` directive.
See https://www.gatsbyjs.com/docs/actions/#createTypes
Mdx.frontmatter.EpisodeNum:
- type: number
value: 10
- type: string
value: '09'
Mdx.frontmatter.NumOfEpisodes:
- type: number
value: 10
- type: string
value: '09'
success building schema - 0.469s
success createPages - 0.002s
success createPagesStatefully - 0.336s
info Total nodes: 329, SitePage nodes: 86 (use --verbose for breakdown)
success Checking for changed pages - 0.005s
success Cleaning up stale page-data - 0.010s
success onPreExtractQueries - 0.001s
success extract queries from components - 2.813s
success write out redirect data - 0.010s
success Build manifest and related icons - 0.565s
success onPostBootstrap - 0.609s
info bootstrap finished - 9.239s
success write out requires - 0.048s
success Building production JavaScript and CSS bundles - 8.175s
⠼ Building HTML renderer
[============================] 10.041 s 7/7 100% Running gatsby-plugin-sharp.IMAGE_PROCESSING jobs
<w> [webpack.cache.PackFileCacheStrategy] Skipped not serializable cache item 'mini-css-extract-plugin /home/daniel_gray/GatsbyProjects/watchsdarot/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[10].oneOf[0].use[1]!/home/daniel_gray/GatsbyProjects/watchsdarot/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[10].oneOf[0].use[2]!/home/daniel_gray/GatsbyProjects/watchsdarot/src/components/footer.module.css|0|Compilation/modules|/home/daniel_gray/GatsbyProjects/watchsdarot/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[10].oneOf[0].use[1]!/home/daniel_gray/GatsbyProjects/watchsdar
⠴ Building HTML renderer
[============================] 10.041 s 7/7 100% Running gatsby-plugin-sharp.IMAGE_PROCESSING jobs
<w> [webpack.cache.PackFileCacheStrategy] Skipped not serializable cache item 'Compilation/modules|/home/daniel_gray/GatsbyProjects/watchsdarot/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[9].oneOf[0].use[0]!/home/daniel_gray/GatsbyProjects/watchsdarot/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[9].oneOf[0].use[1]!/home/daniel_gray/GatsbyProjects/watchsdarot/src/components/foote
success Building HTML renderer - 22.328s
success Execute page configs - 0.028s
success Caching Webpack compilations - 0.002s
success run queries in workers - 0.133s - 78/78 585.57/s
success Running gatsby-plugin-sharp.IMAGE_PROCESSING jobs - 32.550s - 7/7 0.22/s
success Merge worker state - 0.002s
success Rewriting compilation hashes - 0.002s
success Writing page-data.json files to public directory - 0.048s - 79/79 1656.57/s
[ ] 0.000 s 0/85 0% Building static HTML for pages
/home/daniel_gray/GatsbyProjects/watchsdarot/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
throw ex;
^
ReferenceError: Cannot access '_404' before initialization
at Module.default (/home/daniel_gray/GatsbyProjects/watchsdarot/.cache/page-ssr/routes/component---src-pages-404-js.js:182:35)
at RouteHandler.render (/home/daniel_gray/GatsbyProjects/watchsdarot/.cache/page-ssr/routes/webpack:/watchsdarot/.cache/static-entry.js:229:57)
at Ic (/home/daniel_gray/GatsbyProjects/watchsdarot/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:66:30)
at Kc (/home/daniel_gray/GatsbyProjects/watchsdarot/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:68:210)
at Z (/home/daniel_gray/GatsbyProjects/watchsdarot/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:74:89)
at Kc (/home/daniel_gray/GatsbyProjects/watchsdarot/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:72:13)
at Z (/home/daniel_gray/GatsbyProjects/watchsdarot/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:74:89)
at Lc (/home/daniel_gray/GatsbyProjects/watchsdarot/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:77:98)
at Kc (/home/daniel_gray/GatsbyProjects/watchsdarot/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:69:131)
at Z (/home/daniel_gray/GatsbyProjects/watchsdarot/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:74:89)
at Ic (/home/daniel_gray/GatsbyProjects/watchsdarot/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:66:373)
at Kc (/home/daniel_gray/GatsbyProjects/watchsdarot/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:68:210)
at Z (/home/daniel_gray/GatsbyProjects/watchsdarot/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:74:89)
at Kc (/home/daniel_gray/GatsbyProjects/watchsdarot/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:72:271)
at Z (/home/daniel_gray/GatsbyProjects/watchsdarot/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:74:89)
at Kc (/home/daniel_gray/GatsbyProjects/watchsdarot/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:68:481)
Emitted 'error' event on WritableAsPromise instance at:
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
at runNextTicks (node:internal/process/task_queues:65:3)
failed Building static HTML for pages - 2.072s
/home/daniel_gray/GatsbyProjects/watchsdarot/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
throw ex;
^
ReferenceError: Cannot access '_mdx_slug_' before initialization
at Module.default (/home/daniel_gray/GatsbyProjects/watchsdarot/.cache/page-ssr/routes/component---src-pages-player-mdx-slug-js.js:278:35)
at RouteHandler.render (/home/daniel_gray/GatsbyProjects/watchsdarot/.cache/page-ssr/routes/webpack:/watchsdarot/.cache/static-entry.js:229:57)
at Ic (/home/daniel_gray/GatsbyProjects/watchsdarot/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:66:30)
at Kc (/home/daniel_gray/GatsbyProjects/watchsdarot/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:68:210)
at Z (/home/daniel_gray/GatsbyProjects/watchsdarot/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:74:89)
at Kc (/home/daniel_gray/GatsbyProjects/watchsdarot/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:72:13)
at Z (/home/daniel_gray/GatsbyProjects/watchsdarot/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:74:89)
at Lc (/home/daniel_gray/GatsbyProjects/watchsdarot/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:77:98)
at Kc (/home/daniel_gray/GatsbyProjects/watchsdarot/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:69:131)
at Z (/home/daniel_gray/GatsbyProjects/watchsdarot/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:74:89)
at Ic (/home/daniel_gray/GatsbyProjects/watchsdarot/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:66:373)
at Kc (/home/daniel_gray/GatsbyProjects/watchsdarot/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:68:210)
at Z (/home/daniel_gray/GatsbyProjects/watchsdarot/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:74:89)
at Kc (/home/daniel_gray/GatsbyProjects/watchsdarot/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:72:271)
at Z (/home/daniel_gray/GatsbyProjects/watchsdarot/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:74:89)
at Kc (/home/daniel_gray/GatsbyProjects/watchsdarot/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:68:481)
Emitted 'error' event on WritableAsPromise instance at:
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
at runNextTicks (node:internal/process/task_queues:65:3)
ERROR #95313
Building static HTML failed
See our docs page for more info on this error: https://gatsby.dev/debug-html
1 | 'use strict';
> 2 | module.exports = function (obj, predicate) {
| ^
3 | var ret = {};
4 | var keys = Object.keys(obj);
5 | var isArr = Array.isArray(predicate);
WebpackError: Worker exited before finishing task
- index.js:2
[watchsdarot]/[filter-obj]/index.js:2:1
- index.js:194
[watchsdarot]/[query-string]/index.js:194:1
- dev-404-page.js:209
watchsdarot/.cache/dev-404-page.js:209:19
Thanks to anyone tried to help.
Found a solution to it on my own. It was a certain call to document.documentElement that prevented the build process to create static HTML files. No idea still why it pointed to two different pages since it was on another page but everything seems to be working now. For anyone still struggling try wrapping your window or document calls in a useEffect() hook or an if statement like this if(typeof window !== 'undefined')
Hope this helps someone!
Good luck.
In play framework my every first (after compilation) request ends with SQLTimeoutException after 1001 ms
Text of error:
[error] application -
! #72p3a11me - Internal server error, for (GET) [/read] ->
play.api.http.HttpErrorHandlerExceptions$$anon$1: Execution exception[[SQLTimeoutException: Timeout after 1001ms of waiting for a connection.]]
at play.api.http.HttpErrorHandlerExceptions$.throwableToUsefulException(HttpErrorHandler.scala:280)
at play.api.http.DefaultHttpErrorHandler.onServerError(HttpErrorHandler.scala:206)
at play.api.GlobalSettings$class.onError(GlobalSettings.scala:160)
at play.api.DefaultGlobal$.onError(GlobalSettings.scala:188)
at play.api.http.GlobalSettingsHttpErrorHandler.onServerError(HttpErrorHandler.scala:98)
at play.core.server.netty.PlayRequestHandler$$anonfun$2$$anonfun$apply$1.applyOrElse(PlayRequestHandler.scala:100)
at play.core.server.netty.PlayRequestHandler$$anonfun$2$$anonfun$apply$1.applyOrElse(PlayRequestHandler.scala:99)
at scala.concurrent.Future$$anonfun$recoverWith$1.apply(Future.scala:346)
at scala.concurrent.Future$$anonfun$recoverWith$1.apply(Future.scala:345)
at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32)
Caused by: java.sql.SQLTimeoutException: Timeout after 1001ms of waiting for a connection.
at com.zaxxer.hikari.pool.BaseHikariPool.getConnection(BaseHikariPool.java:227)
at com.zaxxer.hikari.pool.BaseHikariPool.getConnection(BaseHikariPool.java:182)
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:93)
at slick.jdbc.hikaricp.HikariCPJdbcDataSource.createConnection(HikariCPJdbcDataSource.scala:12)
at slick.jdbc.JdbcBackend$BaseSession.conn$lzycompute(JdbcBackend.scala:415)
at slick.jdbc.JdbcBackend$BaseSession.conn(JdbcBackend.scala:414)
at slick.jdbc.JdbcBackend$SessionDef$class.prepareStatement(JdbcBackend.scala:297)
at slick.jdbc.JdbcBackend$BaseSession.prepareStatement(JdbcBackend.scala:407)
at slick.jdbc.StatementInvoker.results(StatementInvoker.scala:33)
at slick.jdbc.StatementInvoker.iteratorTo(StatementInvoker.scala:22)
Controller action:
def readEquipment = Action.async { implicit request =>
equipmentService.read map { eq => Ok(Json.toJson(eq)) }
}
DAO method:
override def read(): Future[Seq[Equipment]] =
db.run(equipment.result)
It seems the problem is with lazy initialization which starts only after first request to database. How can I solve this problem?
my ejabberd server is constantly crashing and it is somewhat related to ODBC module but I am not able to understand the issue. Below are the logs. Can anyone help me interpret?
I have copy pasted a few messages below.
=ERROR REPORT==== 14-Oct-2015::00:27:51 === ** State machine <0.27422.5> terminating ** Last message in was {'$gen_sync_event', {<0.27896.5>,#Ref<0.0.10.246367>}, {sql_cmd, {sql_query,<<"SELECT 1;">>}, {1444,782471,512104}}} ** When State == session_established ** Data == {state,<0.27423.5>,odbc,30000,<<"abchost.com">>,1000, {0,{[],[]}}} ** Reason for termination = ** {function_clause,[{odbc,sql_query, [<0.27423.5>,<<"SELECT 1;">>,59000], [{file,"odbc.erl"},{line,183}]}, {ejabberd_odbc,sql_query_internal,1, [{file,"src/ejabberd_odbc.erl"}, {line,468}]}, {ejabberd_odbc,run_sql_cmd,4, [{file,"src/ejabberd_odbc.erl"}, {line,374}]}, {p1_fsm,handle_msg,10, [{file,"src/p1_fsm.erl"},{line,582}]}, {proc_lib,init_p_do_apply,3, [{file,"proc_lib.erl"},{line,237}]}]}
and
00:27:51.573 [error] CRASH REPORT Process <0.27434.5> with 0 neighbours exited with reason: no function clause matching odbc:sql_query(<0.27435.5>, <<"SELECT 1;">>, 59000) line 183 in p1_fsm:terminate/8 line 760
and
00:27:53.965 [error] gen_fsm <0.27439.5> in state session_established terminated with reason: no function clause matching odbc:sql_query(<0.27442.5>, <<"SELECT 1;">>, 59000) line 183
and
=ERROR REPORT==== 14-Oct-2015::00:27:51 === ** Generic server <0.27435.5> terminating ** Last message in was {'DOWN',#Ref<0.0.10.239386>,process,<0.27434.5>, {function_clause, [{odbc,sql_query, [<0.27435.5>,<<"SELECT 1;">>,59000], [{file,"odbc.erl"},{line,183}]}, {ejabberd_odbc,sql_query_internal,1, [{file,"src/ejabberd_odbc.erl"}, {line,468}]}, {ejabberd_odbc,run_sql_cmd,4, [{file,"src/ejabberd_odbc.erl"}, {line,374}]}, {p1_fsm,handle_msg,10, [{file,"src/p1_fsm.erl"},{line,582}]}, {proc_lib,init_p_do_apply,3, [{file,"proc_lib.erl"},{line,237}]}]}} ** When Server state == {state,#Port<0.2314388>,undefined,<0.27434.5>, undefined,on,false,false,off,connected, undefined,0, [#Port<0.2314379>,#Port<0.2314376>], #Port<0.2314386>,#Port<0.2314366>} ** Reason for termination == ** {stopped, {'EXIT',<0.27434.5>, {function_clause, [{odbc,sql_query, [<0.27435.5>,<<"SELECT 1;">>,59000], [{file,"odbc.erl"},{line,183}]}, {ejabberd_odbc,sql_query_internal,1, [{file,"src/ejabberd_odbc.erl"},{line,468}]}, {ejabberd_odbc,run_sql_cmd,4, [{file,"src/ejabberd_odbc.erl"},{line,374}]}, {p1_fsm,handle_msg,10,[{file,"src/p1_fsm.erl"},{line,582}]}, {proc_lib,init_p_do_apply,3, [{file,"proc_lib.erl"},{line,237}]}]}}}
and
00:27:51.552 [error] Supervisor odbc_sup had child [] started with {odbc,start_link_sup,undefined} at <0.27432.5> exit with reason {stopped,{'EXIT',<0.27429.5>,{function_clause,[{odbc,sql_query,[<0.27432.5>,<<"SELECT 1;">>,59000],[{file,"odbc.erl"},{line,183}]},{ejabberd_odbc,sql_query_internal,1,[{file,"src/ejabberd_odbc.erl"},{line,468}]},{ejabberd_odbc,run_sql_cmd,4,[{file,"src/ejabberd_odbc.erl"},{line,374}]},{p1_fsm,handle_msg,10,[{file,"src/p1_fsm.erl"},{line,582}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]}}} in context child_terminated
I think you are referring to a bug that has already been fixed in ejabberd master branch: https://github.com/processone/ejabberd/commit/7d99484859df7c33a73da92d84b5cb5bd27a244e
So I created an account at open shift, created an app, and installed the command line tool. when I do the command rhc domain status it fails:
Loaded suite /usr/bin/rhc-chk
Started
.E
===============================================================================
Error: test_connectivity(Test1_Connectivity)
ArgumentError: too few arguments
/Library/Ruby/Gems/1.8/gems/rhc-0.94.8/bin/rhc-chk:204:in `sprintf'
201: message = sprintf(get_message(:errors,name),*(args.shift || ''))
202: solution = get_message(:solutions,name)
203: if solution
=> 204: message << "\n" << sprintf(solution,*(args.shift || ''))
205: end
206: message
207: end
/Library/Ruby/Gems/1.8/gems/rhc-0.94.8/bin/rhc-chk:204:in `error_for'
/Library/Ruby/Gems/1.8/gems/rhc-0.94.8/bin/rhc-chk:270:in `test_connectivity'
===============================================================================
F
===============================================================================
Failure:
You need to be able to connect to the server in order to test authentication.
<false> is not true.
test_authentication(Test2_Authentication)
/Library/Ruby/Gems/1.8/gems/rhc-0.94.8/bin/rhc-chk:280:in `test_authentication'
277: # Checking Authentication
278: #
279: def test_authentication
=> 280: assert $connectivity, error_for(:cant_connect)
281:
282: data = {'rhlogin' => $rhlogin}
283: response = fetch_url_json("/broker/userinfo", data)
===============================================================================
..F
===============================================================================
Failure: You must have an account on the server in order to test: whether you have a valid key loaded in your agent.
test_03_remote_ssh_keys(Test3_SSH)
/Library/Ruby/Gems/1.8/gems/rhc-0.94.8/bin/rhc-chk:317:in `require_login'
314: end
315:
316: def require_login(test)
=> 317: flunk(error_for(:no_account,test)) if $user_info.nil?
318: end
319:
320: def require_remote_keys(test)
/Library/Ruby/Gems/1.8/gems/rhc-0.94.8/bin/rhc-chk:321:in `require_remote_keys'
/Library/Ruby/Gems/1.8/gems/rhc-0.94.8/bin/rhc-chk:376:in `test_03_remote_ssh_keys'
===============================================================================
F
===============================================================================
Failure: You must have an account on the server in order to test: connecting to your applications.
test_04_ssh_connect(Test3_SSH)
/Library/Ruby/Gems/1.8/gems/rhc-0.94.8/bin/rhc-chk:317:in `require_login'
314: end
315:
316: def require_login(test)
=> 317: flunk(error_for(:no_account,test)) if $user_info.nil?
318: end
319:
320: def require_remote_keys(test)
/Library/Ruby/Gems/1.8/gems/rhc-0.94.8/bin/rhc-chk:383:in `test_04_ssh_connect'
===============================================================================
Finished in 2.403595 seconds.
7 tests, 8 assertions, 3 failures, 1 errors, 0 pendings, 0 omissions, 0 notifications
42.8571% passed
Not really understanding why it's not able to connect. I was able to use: rhc domain show, with no problems.
Anyone have any suggestions on how to fix this?
It's a bug that should get fixed in the upcoming release. Even though you see this error it shouldn't affect any other behaviour.
I made a comet chat server with Erlang and Mochiweb. And I run the "./start-dev.sh" to start the server. But after about 1 month I got the following error:
=ERROR REPORT==== 26-Sep-2009::09:21:06 ===
{mochiweb_socket_server,235,
{child_error,
{badmatch,
{error,
[70,97,105,108,101,100,32,115,101,110,100,105,110,103,32,100,
97,116,97,32,111,110,32,115,111,99,107,101,116,32,58,32,
"closed"]}}}}
mysql: fetch "SELECT appKey FROM applications WHERE appID = 1" (id p1)
=CRASH REPORT==== 26-Sep-2009::09:21:10 ===
crasher:
initial call: mochiweb_socket_server:acceptor_loop/1
pid: <0.4271.23>
registered_name: []
exception error: no match of right hand side value
{error,[70,97,105,108,101,100,32,115,101,110,100,105,110,
103,32,100,97,116,97,32,111,110,32,115,111,99,
107,101,116,32,58,32,"closed"]}
in function moonwalker_web:loop/2
in call from mochiweb_http:headers/5
ancestors: [moonwalker_web,moonwalker_sup,<0.52.0>]
messages: []
links: [<0.54.0>,#Port<0.792854>]
dictionary: [{mochiweb_request_body,
<<"appID=1&appKey=keyy&userID=8048943&nickName=bill&buddies=N%3B×tamp=1253928070154">>},
{mochiweb_request_recv,true},
{mochiweb_request_post,
[{"appID","1"},
{"appKey","key"},
{"userID","8048943"},
{"nickName",[143,229,167,144]},
{"buddies","N;"},
{"timestamp","1253928070154"}]},
{mochiweb_request_path,"/online"}]
trap_exit: false
status: running
heap_size: 2584
stack_size: 24
reductions: 1368
neighbours:
=ERROR REPORT==== 26-Sep-2009::09:21:10 ===
{mochiweb_socket_server,235,
{child_error,
{badmatch,
{error,
[70,97,105,108,101,100,32,115,101,110,100,105,110,103,32,100,
97,116,97,32,111,110,32,115,111,99,107,101,116,32,58,32,
"closed"]}}}}
And if turn the following numbers into characters
[70,97,105,108,101,100,32,115,101,110,100,105,110,103,32,100,
97,116,97,32,111,110,32,115,111,99,107,101,116,32,58,32,
"closed"]}}}}
they are
Failed sending data on socket :"closed"
Does that mean I have problems with MySQL connection or socket?
I don't know if this error has something to do with my "./start-dev.sh" or I just had some wrong settings?
And what else information do I have to provide for diagnosing?
Thanks and looking forward to your reply?
It looks like somewhere in the loop/2 function you don't handle an {error,Error} return from a function call. This causes the error which crashes the process. Without the code it is difficult to say what caused the error return.