I am migrating my react front that was previously rendered along rails with react-rails to a separate react application build from scratch, when adding a component that makes use of makeStyles I get the following error:
makeStyles.js:156 Uncaught TypeError: Cannot read properties of undefined (reading 'refs')
at detach (makeStyles.js:156:1)
at makeStyles.js:240:1
at makeStyles.js:194:1
at safelyCallDestroy (react-dom.development.js:22932:1)
at commitHookEffectListUnmount (react-dom.development.js:23100:1)
at commitPassiveUnmountOnFiber (react-dom.development.js:25031:1)
at commitPassiveUnmountEffects_complete (react-dom.development.js:25007:1)
at commitPassiveUnmountEffects_begin (react-dom.development.js:24996:1)
at commitPassiveUnmountEffects (react-dom.development.js:24941:1)
at flushPassiveEffectsImpl (react-dom.development.js:27038:1)
detach # makeStyles.js:156
(anonymous) # makeStyles.js:240
(anonymous) # makeStyles.js:194
safelyCallDestroy # react-dom.development.js:22932
commitHookEffectListUnmount # react-dom.development.js:23100
commitPassiveUnmountOnFiber # react-dom.development.js:25031
commitPassiveUnmountEffects_complete # react-dom.development.js:25007
commitPassiveUnmountEffects_begin # react-dom.development.js:24996
commitPassiveUnmountEffects # react-dom.development.js:24941
flushPassiveEffectsImpl # react-dom.development.js:27038
flushPassiveEffects # react-dom.development.js:26984
(anonymous) # react-dom.development.js:26769
workLoop # scheduler.development.js:266
flushWork # scheduler.development.js:239
performWorkUntilDeadline # scheduler.development.js:533
(I am using the 4.12 version of material ui)
Related
I install the swift-lint and I also created yml file into project and I added the require script and rules but the problem is not reflecting the rules into project code.
Here is the terminal screenshot.
.
Here is the code script.
Here is the code and the rules which is available into GitHub.
# By default, SwiftLint uses a set of sensible default rules you can adjust:
disabled_rules: # rule identifiers turned on by default to exclude from running
- colon
- comma
- control_statement
opt_in_rules: # some rules are turned off by default, so you need to opt-in
- empty_count # Find all the available rules by running: `swiftlint rules`
# Alternatively, specify all rules explicitly by uncommenting this option:
# only_rules: # delete `disabled_rules` & `opt_in_rules` if using this
# - empty_parameters
# - vertical_whitespace
included: # paths to include during linting. `--path` is ignored if present.
- Source
excluded: # paths to ignore during linting. Takes precedence over `included`.
- Carthage
- Pods
- Source/ExcludedFolder
- Source/ExcludedFile.swift
- Source/*/ExcludedFile.swift # Exclude files with a wildcard
analyzer_rules: # Rules run by `swiftlint analyze`
- explicit_self
# configurable rules can be customized from this configuration file
# binary rules can set their severity level
force_cast: warning # implicitly
force_try:
severity: warning # explicitly
# rules that have both warning and error levels, can set just the warning level
# implicitly
line_length: 110
# they can set both implicitly with an array
type_body_length:
- 300 # warning
- 400 # error
# or they can set both explicitly
file_length:
warning: 500
error: 1200
# naming rules can set warnings/errors for min_length and max_length
# additionally they can set excluded names
type_name:
min_length: 4 # only warning
max_length: # warning and error
warning: 40
error: 50
excluded: iPhone # excluded via string
allowed_symbols: ["_"] # these are allowed in type names
identifier_name:
min_length: # only min_length
error: 4 # only error
excluded: # excluded via string array
- id
- URL
- GlobalAPIKey
reporter: "xcode" # reporter type (xcode, json, csv, checkstyle, codeclimate, junit, html, emoji, sonarqube, markdown, github-actions-logging)
Here is the screenshot of the code still showing the error and warning.
mngmt-users.properties file. The users are added in the file but when I try to run the localhost it says it's running then if I try to view the admin console it is redirecting to http://localhost:9990/error/index_win.html. That tells the server is running but I could not open admin console.
#
# Properties declaration of users for the realm 'ManagementRealm' which is the default realm
# for new installations. Further authentication mechanism can be configured
# as part of the <management /> in standalone.xml.
#
# Users can be added to this properties file at any time, updates after the server has started
# will be automatically detected.
#
# By default the properties realm expects the entries to be in the format: -
# username=HEX( MD5( username ':' realm ':' password))
#
# A utility script is provided which can be executed from the bin folder to add the users: -
# - Linux
# bin/add-user.sh
#
# - Windows
# bin\add-user.bat
#
#$REALM_NAME=ManagementRealm$ This line is used by the add-user utility to identify the realm name already used in this file.
#
# On start-up the server will also automatically add a user $local - this user is specifically
# for local tools running against this AS installation.
#
# The following illustrates how an admin user could be defined, this
# is for illustration only and does not correspond to a usable password.
#
#admin=2a0923285184943425d1f53ddd58ec7a
tejaswini=25ab658c2861b2e64783aaa9ba95c2e5
aswini#19=388ced81791ddb1760b83dc4ec8b7a61
saisana=ff39d778414ab12d84fc4fa7fdacb634
alekya=d72e9c90345ce4d9290c3a2728b3cd60
prasad=c6c7c67cf343f6862d3b77bae9f61d17
teju=28b9e55b314fd60855a7843b4455dbed
Screen shot of added user
May be u have tried to create specifically application user or management user when u ran the addUser utility,
please refer the below link for steps to register user
https://bgasparotto.com/add-user-wildfly
I have been running a SAP UI5 application for a year with out any problems. But today it changed and gave me Access-Control-Allow-Origin.
This the code. I have only tried to change the version but it does not help.
<script
id="sap-ui-bootstrap"
src="https://sapui5.netweaver.ondemand.com/1.38.12/resources/sap-ui-core.js"
data-sap-ui-theme="sap_bluecrystal"
data-sap-ui-libs="sap.ui.commons,sap.ui.layout, sap.ui.table,sap.m,sap.ui"
data-sap-ui-xx-bindingSyntax="complex"
data-sap-ui-resourceroots='{"VendorApprovalComponent.DO_OrgTransord" : "./" }' >
</script>
The errors that I'm getting is the following.
XMLHttpRequest cannot load sapui5.netweaver.ondemand.com/1.38.12/resources/sap/ui/layout/library-preload.json.
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'CUSTOMERURL' is therefore not allowed access.
The response had HTTP status code 404.send # sap-ui-core.js:126ajax # sap-ui-core.js:126q.sap.preloadModules # sap-ui-core.js:174(anonymous function) # sap-ui-core.js:174each # sap-ui-core.js:115q.sap.registerPreloadedModules # sap-ui-core.js:174success # sap-ui-core.js:174p # sap-ui-core.js:126fireWith # sap-ui-core.js:126h3 # sap-ui-core.js:126(anonymous function) # sap-ui-core.js:126send # sap-ui-core.js:126ajax # sap-ui-core.js:126q.sap.preloadModules # sap-ui-core.js:174(anonymous function) # sap-ui-core.js:833each # sap-ui-core.js:115constructor # sap-ui-core.js:833(anonymous function) # sap-ui-core.js:949applyAMDFactoryFn # sap-ui-core.js:174(anonymous function) # sap-ui-core.js:174t1 # sap-ui-core.js:174sap.ui.define # sap-ui-core.js:174s1 # sap-ui-core.js:174r1 # sap-ui-core.js:174q.sap.require # sap-ui-core.js:174(anonymous function) # sap-ui-core.js:1761
sap-ui-core.js:160 2016-11-03 11:32:52.176935 failed to preload 'sap.ui.layout.library-preload': NetworkError: Failed to execute 'send' on
My webserver is a SAP NW JAVA server running behind a ICM firewall.
I'm having a hard time setting up the replication between PouchDB and Sync Gateway.
I tried to follow Couchbase's blog post, but I wasn't successfull, either.
I'm building an Ionic application with angular-pouchdb and ng-pouchdb.
Here's what I got figured out so far:
every time I call pouchCollection it either creates a new database with the given name, or gives you a reference of the already created database;
the Sync Gateway is responsible for authorization of each document. I'm running it now with the GUEST user enabled, with "admin_channels": ["*"], so everyone should be able to access everything, right?
CORS should be enable, since both the app and the server are running on the same machine (localhost)
to get replication in both ways, I should use db.sync(URL) (angular-pouchdb), where URL is something like http://localhost:4984/prospect/ (and prospect could be the DB name)
Here's my Sync Gateway config.json file:
{
"log": ["CRUD", "REST+", "Access"],
"facebook": {"register": true},
"CORS": {
"Origin": ["http://localhost:8100"],
"LoginOrigin": ["http://localhost:8100"],
"Headers": ["Content-Type"],
"MaxAge": 17280000
},
"databases": {
"prospect": {
"server": "walrus:",
"users": {
"GUEST": {"disabled": false, "admin_channels": ["*"]}
},
"sync":
`
function(doc, oldDoc) {
channel("everything");
}
`
}
}
}
Here's my Ionic code:
app.controller('MyCtrl', function($scope, pouchCollection) {
$scope.students = pouchCollection('students');
var URL = 'http://localhost:4984/prospect/';
$scope.students.$db.replicate.sync(URL);
// ...list the array in the view
}
Whenever I try to make the replication work, I get the following in the console when running for the first time:
GET http://localhost:4984/prospect/_local/jeOaLtKGemQWDpNAPzorJQ%3D%3D?_nonce=1442271117949 404 (Not Found)xhRequest # pouchdb.js:641625.module.exports # pouchdb.js:6435ajax # pouchdb.js:604824.module.exports # pouchdb.js:6211ajax # pouchdb.js:989(anonymous function) # pouchdb.js:994ajaxPromise # pouchdb.js:993(anonymous function) # pouchdb.js:1241(anonymous function) # pouchdb.js:1069979 # pouchdb.js:10760(anonymous function) # pouchdb.js:7659(anonymous function) # pouchdb.js:764679 # pouchdb.js:1076068.Checkpointer.getCheckpoint # pouchdb.js:9407(anonymous function) # pouchdb.js:10076
pouchdb.js:6416 GET http://localhost:4984/prospect/_local/2_QcxPjLD.zmtOXa7VM8Gw%3D%3D?_nonce=1442271117953 404 (Not Found)xhRequest # pouchdb.js:641625.module.exports # pouchdb.js:6435ajax # pouchdb.js:604824.module.exports # pouchdb.js:6211ajax # pouchdb.js:989(anonymous function) # pouchdb.js:994ajaxPromise # pouchdb.js:993(anonymous function) # pouchdb.js:1241(anonymous function) # pouchdb.js:1069979 # pouchdb.js:10760(anonymous function) # pouchdb.js:7659(anonymous function) # pouchdb.js:764679 # pouchdb.js:10760(anonymous function) # pouchdb.js:9408
pouchdb.js:6416 GET http://localhost:4984/prospect/_local/jeOaLtKGemQWDpNAPzorJQ%3D%3D?_nonce=1442271118095 404 (Not Found)xhRequest # pouchdb.js:641625.module.exports # pouchdb.js:6435ajax # pouchdb.js:604824.module.exports # pouchdb.js:6211ajax # pouchdb.js:989(anonymous function) # pouchdb.js:994ajaxPromise # pouchdb.js:993(anonymous function) # pouchdb.js:1241(anonymous function) # pouchdb.js:1069979 # pouchdb.js:10760(anonymous function) # pouchdb.js:7659(anonymous function) # pouchdb.js:764679 # pouchdb.js:10760updateCheckpoint # pouchdb.js:930368.Checkpointer.updateTarget # pouchdb.js:936868.Checkpointer.writeCheckpoint # pouchdb.js:9362finishBatch # pouchdb.js:9829
(index):28 The above 404 is totally normal. PouchDB is just checking if a remote checkpoint exists.
Since the last line says it is normal, I assume everything is fine.
When I run the app in the browser and in the emulator, Sync Gateway says things like:
2015-09-14T19:54:04.913-03:00 HTTP: #001: GET /prospect/?_nonce=1442271244612
2015-09-14T19:54:18.730-03:00 HTTP: #002: GET /prospect/?_nonce=1442271258729
...
2015-09-14T19:56:13.362-03:00 HTTP: #049: GET /prospect/_local/2_QcxPjLD.zmtOXa7VM8Gw==?_nonce=1442271373356
2015-09-14T19:56:13.376-03:00 HTTP: #050: PUT /prospect/_local/2_QcxPjLD.zmtOXa7VM8Gw==
To me, it looks like everything is working. But I can't get it to sync with the iOS emulator or in a different browser.
What am I missing?
For your Questions..
[2]: The * Star channel is the channel where every document is automatically added to that channel. Example, a guest user will be granted the * star channel where that gives you the open ended access so any user that gets * (star) will be able to see everything in the system.
[3]: You do not need to enable CORS as sync gateway is running on the same domain as your webapp. Enabling CORS allows web apps to access resources on other domains rather than the origin domain.
The LoginOrigin list protects access to the _session and _facebook endpoints.
[4]: To replicate your data, within the app.js file you would define a URL variable for sync, like:
var SYNC_GATEWAY_URL = 'http://127.0.0.1:4984/prospect/';
I am trying to connect with ejabberd server using strophe.js, but I got the following error:
POST http://localhost/http-bind/ 404 (Not Found)
Strophe.Bosh._processRequest.sendFunc # strophe.js:4614
Strophe.Bosh._processRequest # strophe.js:4626
Strophe.Bosh._throttledRequestHandler # strophe.js:4778
Strophe.Bosh._connect # strophe.js:4177Strophe.Connection.connect # strophe.js:2335
$scope.login # app.js:162
fn # VM165:4
Ic.(anonymous function).compile.d.on.f # angular.js:23411
$get.n.$eval # angular.js:15916
$get.n.$apply # angular.js:16016
(anonymous function) # angular.js:23416
n.event.dispatch # jquery-2.1.3.min.js:3
n.event.add.r.handle # jquery-2.1.3.min.js:3
strophe.js:2784 7
I have found that Skype some time use port 80, that was assigned to Apache server.This think may prevent the http-binding.After quit Skype, It works fine.