I am using Spring Boot 3.0.1 with Java 17. For spring boot admin and client, I am using the latest version as follows.
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-client</artifactId>
<version>3.0.0-M8</version>
</dependency>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-server-ui</artifactId>
<version>3.0.0-M8</version>
</dependency>
After the login screen to admin, I get the following. Nothing rendered on the page.
:root {
--main-50: 238, 252, 250;
--main-100: 217, 247, 244;
--main-200: 183, 240, 234;
--main-300: 145, 232, 224;
--main-400: 107, 224, 213;
--main-500: 71, 217, 203;
--main-600: 39, 190, 175;
--main-700: 30, 144, 132;
--main-800: 20, 97, 90;
--main-900: 10, 47, 43;
--bg-color-start: #91E8E0;
--bg-color-stop: #1E9084;
}
.bg-color-start {
transition: 0.4s ease;
stop-color: var(--bg-color-start);
}
.bg-color-stop {
transition: 0.4s ease;
stop-color: var(--bg-color-stop);
}
What am I missing? Is the latest version unstable still?
I think this is the same question like here: https://github.com/codecentric/spring-boot-admin/issues/2218
The css file is used by the login page, but needs authenticated access. So it is loaded after login and then displayed.
Solution is to permit access to the variables.css file like
.requestMatchers(new AntPathRequestMatcher(this.adminServer.path("/variables.css"))).permitAll()
in the spring security config, similar to the static assets.
The SBA Team will check if this is really required or if it can be changed in SBA before final release of 3.0. If it will be needed we'll update the docs.
Related
Here's my code i'm trying to mint spl token using spl js library:
(async () => {
const connection = new web3.Connection(web3.clusterApiUrl("devnet"));
let secretKey = Uint8Array.from([
186, 104, 237, 47, 123, 227, 2, 226, 150, 7, 169, 40, 252, 67, 161, 86, 198,....
183, 130, 31, 174, 135, 153, 46, 227, 154, 125, 20, 79, 209,
]);
const myKeypair = web3.Keypair.fromSecretKey(secretKey);
console.log(myKeypair.publicKey);
mint = await splToken.createMint(
connection,
myKeypair,
myKeypair.publicKey,
null,
9,
splToken.TOKEN_PROGRAM_ID
);
console.log("mint:"+mint);
})();
This is the error im getting:
solana/node_modules/#solana/web3.js/lib/index.cjs.js:1791
const key = signer.publicKey.toString();
^
TypeError: Cannot read properties of undefined (reading 'toString')
at Transaction.sign solana/node_modules/#solana/web3.js/lib/index.cjs.js:1791:36)
at Connection.sendTransaction solana/node_modules/#solana/web3.js/lib/index.cjs.js:9676:21)
those are the parameters for createMint()
#param connection — Connection to use
#param payer — Payer of the transaction and initialization fees
#param mintAuthority — Account or multisig that will control minting
#param freezeAuthority — Optional account or multisig that can freeze token accounts
#param decimals — Location of the decimal place
#param keypair — Optional keypair, defaulting to a new random one
Last one type is Keypair. but you are passing splToken.TOKEN_PROGRAM_ID which is PublicKey. you need to create another keypair for the last arg
I am trying to automate a scenario in an android application using appium, java. I need to scroll down to an element on the screen to enter a text value. I'm initializing the elements using page factory as shown below.
#AndroidFindBy(uiAutomator = "new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().resourceId(\"com.call4site.handymanservices:id/email\"))")
private WebElement txt_email;
I'm getting a strange error in console as below.
org.openqa.selenium.InvalidSelectorException:
Unsupported CSS selector '*[name='txt_email']'. Reason: 'Error: 'name' is not a valid attribute. Supported attributes are 'checkable, checked, clickable, enabled, focusable, focused, long-clickable, scrollable, selected, index, instance, description, resource-id, text, class-name, package-name''
For documentation on this error, please visit: https://selenium.dev/exceptions/#invalid_selector_exception
Build info: version: '4.6.0', revision: '79f1c02ae20'
System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11'
Driver info: io.appium.java_client.android.AndroidDriver
Command: [da3c259c-cf9d-4457-967a-060eadf5f643, findElement {using=css selector, value=*[name='txt_email']}]
Capabilities {appium:app: C:\Users\laksh\Downloads\ha..., appium:appPackage: com.call4site.handymanservices, appium:automationName: uiautomator2, appium:databaseEnabled: false, appium:
desired: {app: C:\Users\laksh\Downloads\ha..., automationName: uiautomator2, deviceName: Android Emulator, platformName: android, platformVersion: 11.0, udid: emulator-5554}, appium:de
viceApiLevel: 30, appium:deviceManufacturer: unknown, appium:deviceModel: Android SDK built for x86, appium:deviceName: emulator-5554, appium:deviceScreenDensity: 560, appium:deviceScr
eenSize: 1440x2560, appium:deviceUDID: emulator-5554, appium:javascriptEnabled: true, appium:locationContextEnabled: false, appium:networkConnectionEnabled: true, appium:pixelRatio: 3.
5, appium:platformVersion: 11, appium:statBarHeight: 84, appium:takesScreenshot: true, appium:udid: emulator-5554, appium:viewportRect: {height: 2308, left: 0, top: 84, width: 1440}, appium:warnings: {}, appium:webStorageEnabled: false, platformName: ANDROID}
Session ID: da3c259c-cf9d-4457-967a-060eadf5f643
at tests.signUpTests.signUpAsNewUser(signUpTests.java:32)
But if I use the following code to initialize the element, then I'm able to scroll down and enter text to it. Has anyone faced this issue?
WebElement txt_email = driver.findElement(AppiumBy.androidUIAutomator("new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().resourceId(\"com.call4site.handymanservices:id/email\"))"));
I upgraded to iOS 14 + XCode-beta Version 12 beta 3 and from that moment React Native Image component not render an image from external URL. On Android, the Image component runs still perfectly.
Here is my code on how I calling an image.
const avatarImageUrl = Config.IMAGE_BASE_URL + this.props.data.avatar;
<Image source={{uri: avatarImageUrl}} style={styles.avatarImage}/>
And this is my Config component:
export default Config = {
API_BASE_URL: 'link-to-api',
IMAGE_BASE_URL: 'link-to-api',
// date when Realm database is updated with fresh API data and
bundled with app
BUILD_DATE: '2020-06-18',
};
And styles
avatarImage: {
flex: 3,
width: '100%',
height: '100%',
borderTopLeftRadius: 10,
borderTopRightRadius: 10,
backgroundColor: '#cccccc',
width: "100%",
marginLeft: 0,
marginRight: 0,
},
It's there anyone who has the same problem with React Native on iOS14?
Thaks
Robert
You can try few things:
A. Use the following package to fix the issue by running:
npm install --save react-native-fix-image
npx react-native-fix-image
Then rebuild project.
Note: each time after reinstalling node_modules you'll have to run npx react-native-fix-image.
B. Upgrade react-native to V0.63.2 then rebuild the project.
I used solution A.
I need to use different proxies to avoid being banned.
i read this question and this one
i put my proxies in proxylist.txt
http://xx.xx.xxx.xxx:port
http://xxx.xxx.xx.xxx:port
http://xx.xx.xxx.xxx:port
http://xxx.xxx.xx.xxx:port
and i set it in custom_settings
class MyClass(scrapy.Spider):
reload(sys)
sys.setdefaultencoding('utf8')
start_time = time.time()
name = 'mySpider'
custom_settings = {
'ROBOTSTXT_OBEY' : 'False',
'RETRY_TIMES' : 10,
'PROXY_LIST' : 'proxylist.txt',
'PROXY_MODE' : 0,
'DOWNLOADER_MIDDLEWARES' : {
'scrapy.downloadermiddlewares.retry.RetryMiddleware': 90,
'scrapy_proxies.RandomProxy': 100,
'scrapy.downloadermiddlewares.httpproxy.HttpProxyMiddleware': 110,
'scrapy_crawlera.CrawleraMiddleware': 600,
'scrapy.contrib.downloadermiddleware.useragent.UserAgentMiddleware': None,
'random_useragent.RandomUserAgentMiddleware': 400
},
}
this version worked when my proxies had no Passwords
Now i have the password for each proxy, how can i change it for working with password ?
I answer my own question.
I use this and it works:
http://USERNAME:PASSWORD#PROXYIP:PROXYPORT
while installing django_facebook, i got an error :
Validating models...
No handlers could be found for logger "django_facebook.models"
Unhandled exception in thread started by <function wrapper at 0x1032a5758>
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/django/utils/autoreload.py", line 93, in wrapper
fn(*args, **kwargs)
File "/Library/Python/2.7/site-packages/django/core/management/commands/runserver.py", line 101, in inner_run
self.validate(display_num_errors=True)
File "/Library/Python/2.7/site-packages/django/core/management/base.py", line 310, in validate
num_errors = get_validation_errors(s, app)
File "/Library/Python/2.7/site-packages/django/core/management/validation.py", line 113, in get_validation_errors
from django.utils.image import Image
File "/Library/Python/2.7/site-packages/django/utils/image.py", line 154, in <module>
Image, _imaging, ImageFile = _detect_image_library()
File "/Library/Python/2.7/site-packages/django/utils/image.py", line 108, in _detect_image_library
_("Neither Pillow nor PIL could be imported: %s") % err
django.core.exceptions.ImproperlyConfigured: Neither Pillow nor PIL could be imported: No module named Image
It is a pure django project created by pycharm. I was following the document of django_facebook, installation section. What I do is just get facebook app and type the code 'django_facebook' in INSTALLED_APP in settings.py.
It's same results when syncdb also.
I'm using python-2.7.5 and django-1.6.5.
I can't find any answer to solve this. anybody knows this?
Regarding the warningNo handlers could be found for logger "django_facebook.models" and not the error. This question came up on search for that warning, thought this would be useful for others.
django-facebook outputs logs when in operation, just like other django components do. You have to tell Django what you want to do with these messages. In django terminology the app outputs some messages as a logger without needing to know what to do with them, you have to then patch these to a handler which doesn't know anything about your use case, but does know about sending emails/texts/carrier pigeons.
In your settings.py file find LOGGING=..., in the loggers dict you will have to specify what handlers you want to handle the output from django-facebook.
For more information see the docs on logging https://djangoproject.com/en/dev/topics/logging/
My logging variable looks like this, notice the bit at the bottom:
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'filters': {
'require_debug_false': {
'()': 'django.utils.log.RequireDebugFalse'
}
},
'handlers': {
'mail_admins': {
'level': 'ERROR',
'filters': ['require_debug_false'],
'class': 'django.utils.log.AdminEmailHandler'
},
'console': {
'level': 'DEBUG',
'class': 'logging.StreamHandler',
},
},
'loggers': {
'django.request': {
'handlers': ['mail_admins','console'],
'level': 'ERROR',
'propagate': True,
},
'django_facebook.models': {
'handlers': ['mail_admins','console'],
'level': 'ERROR',
'propagate': True,
}
}
}
You could try pip install pillow