android appium optionalIntentArguments multiple boolean extra params - appium-android

Appium for android has optionalIntentArguments capability. The question is I would like to pass in multiple Boolean extra parameter (--ez). Anyone know how to do that ? Thank you
I have tried
--ez IN_APP_USAGE_ENABLED true --ez WEB_DASHBOARD_IS_SHOW true
--ez IN_APP_USAGE_ENABLED true, --ez WEB_DASHBOARD_IS_SHOW true
--ez IN_APP_USAGE_ENABLED true, WEB_DASHBOARD_IS_SHOW true
--ez IN_APP_USAGE_ENABLED true WEB_DASHBOARD_IS_SHOW true
--ez [IN_APP_USAGE_ENABLED true, WEB_DASHBOARD_IS_SHOW true]
they always return with error in appium

You can try below method to use :
capabilities.setCapability("optionalIntentArguments","--ez IN_APP_USAGE_ENABLED true --ez WEB_DASHBOARD_IS_SHOW true");

Related

zod-prisma keeps getting stuck at the generation step

I just installed zod-prisma to try it out, but so far nothing is working.
I attempted to run it on two separate projects, one has a small prisma and the other has a relatively large one.
Both didn't work, and remained stuck.
I can't share the schemas unfortunately. So, any ideas what could the problem be?
I also enabled strict in tsconfig, still the same.
prisma : 3.6.0
#prisma/client : 3.6.0
Current platform : debian-openssl-1.1.x
Query Engine (Node-API) : libquery-engine dc520b92b1ebb2d28dc3161f9f82e875bd35d727 (at node_modules/#prisma/engines/libquery_engine-debian-openssl-1.1.x.so.node)
Migration Engine : migration-engine-cli dc520b92b1ebb2d28dc3161f9f82e875bd35d727 (at node_modules/#prisma/engines/migration-engine-debian-openssl-1.1.x)
Introspection Engine : introspection-core dc520b92b1ebb2d28dc3161f9f82e875bd35d727 (at node_modules/#prisma/engines/introspection-engine-debian-openssl-1.1.x)
Format Binary : prisma-fmt dc520b92b1ebb2d28dc3161f9f82e875bd35d727 (at node_modules/#prisma/engines/prisma-fmt-debian-openssl-1.1.x)
Default Engines Hash : dc520b92b1ebb2d28dc3161f9f82e875bd35d727
Studio : 0.440.0
typescript": "^4.5.2"
"zod-prisma": "^0.5.4"
{
"compilerOptions": {
"target": "es2018",
"module": "commonjs",
"lib": ["es2018", "esnext.asynciterable"],
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"declaration": true,
"removeComments": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"sourceMap": false,
"outDir": "./dist",
"baseUrl": "./",
"incremental": true,
"skipLibCheck": true,
"strictNullChecks": false,
"noImplicitAny": false,
"strictBindCallApply": false,
"forceConsistentCasingInFileNames": false,
"noFallthroughCasesInSwitch": false,
"strict": true
}
}
I also cloned the example in the repo, but it had no zod-prisma configured at all. So, I added this from README:
generator zod {
provider = "zod-prisma"
output = "./zod"
relationModel = true
// relationModel = "default" // Do not export model without relations.
// relationModel = false // Do not generate related model
modelCase = "PascalCase"
// modelCase = "camelCase" // Output models using camel case (ex. userModel, postModel)
modelSuffix = "Model"
// useDecimalJs = false // (default) represent the prisma Decimal type using as a JS number
useDecimalJs = true
imports = null
// https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-by-null-values
prismaJsonNullability = true
// prismaJsonNullability = false // allows null assignment to optional JSON fields
}
but it also got stuck when I ran npx prisma generate
I use node v14.19.1
I upgraded to latest prisma version:
prisma : 3.13.0
#prisma/client : 3.13.0
Current platform : debian-openssl-1.1.x
Query Engine (Node-API) : libquery-engine efdf9b1183dddfd4258cd181a72125755215ab7b (at node_modules/#prisma/engines/libquery_engine-debian-openssl-1.1.x.so.node)
Migration Engine : migration-engine-cli efdf9b1183dddfd4258cd181a72125755215ab7b (at node_modules/#prisma/engines/migration-engine-debian-openssl-1.1.x)
Introspection Engine : introspection-core efdf9b1183dddfd4258cd181a72125755215ab7b (at node_modules/#prisma/engines/introspection-engine-debian-openssl-1.1.x)
Format Binary : prisma-fmt efdf9b1183dddfd4258cd181a72125755215ab7b (at node_modules/#prisma/engines/prisma-fmt-debian-openssl-1.1.x)
Default Engines Hash : efdf9b1183dddfd4258cd181a72125755215ab7b
Studio : 0.459.0
Still same issue!
On a side note, I would appreciate it if someone with a rep of 1500 or higher could add the zod-prisma tag.
There was a missing dependency, simply install zod.
Though, the generator should have displayed a warning.
I also submitted a PR to fix this issue for good!

400 Bad Request with MS Graph when adding list items

For the life of me I can't successfully add SharePoint list items. I have in the past, now I'm stumped, using either Invoke-WebRequest or Invoke-RestMethod. I am able to update (PATCH) without issue, and can do all sorts of GET operations against the same sites, lists, items, etc.
Here's a fiddler capture of my actual HTTP POST request (Guid's fudged):
POST https://graph.microsoft.com/v1.0/sites/2df3a5af-979d-46d6-b24d-14e4e4b58aa9/lists/2252b849-53f9-4816-bc0b-d9183357c702/items HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJ0f...
User-Agent: MSGraphPSEssentials/0.4.0
Host: graph.microsoft.com
Content-Length: 537
{
"Fields": {
"AccountStatus": "Enabled",
"DisplayName": "Fictional User 1",
"UserId": "67853e89-65a9-431d-a3b1-1d60ab74dc1f",
"ADObjectGuid": "56752e89-65a9-431d-a3b1-1d61ab78dc1f",
"AccountCreated": "2019-03-12",
"AADObjectId": "8df5db8d-1d7a-4b35-b498-138eef2946fa",
"AccountType": "AD-Synced",
"ADLastLogonDate": "2020-08-25"
}
}
For each of the fields/columns shown, the content type on the SPO list is either "single line of text" or "date and time", and in either case, no data is required. There are no other columns on the list that are required (purposely while I troubleshoot this).
Can anyone spot anything obvious that would cause me to receive 400 Bad Request and the only additional info provided is "Invalid Request"
Here's a fiddler capture of an example response:
HTTP/1.1 400 Bad Request
Date: Thu, 29 Apr 2021 14:26:08 GMT
Content-Type: application/json
Cache-Control: no-cache
Transfer-Encoding: chunked
Strict-Transport-Security: max-age=31536000
request-id: 87190763-4bfe-4a88-a69e-154fd60aad81
client-request-id: 87190763-4bfe-4a88-a69e-154fd60aad81
x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"East US","Slice":"E","Ring":"5","ScaleUnit":"004","RoleInstance":"BL02EPF000035AB"}}
da
{"error":{"code":"invalidRequest","message":"Invalid request","innerError":{"date":"2021-04-29T14:26:08","request-id":"87190763-4bfe-4a88-a69e-154fd60aad81","client-request-id":"87190763-4bfe-4a88-a69e-154fd60aad81"}}}
0
Finally, here are the columns as returned by successful MS Graph request to /sites/<ID>/lists/<ID>?Expand=Columns:
>$columns.columns |select Name, DisplayName, ReadOnly, Required
name displayName readOnly required
---- ----------- -------- --------
ManagerDisplayName ManagerDisplayName False False
ManagerEmail ManagerEmail False False
Ignore Ignore False False
UserId UserId False False
Title Title False False
ComplianceAssetId Compliance Asset Id True False
IgnoreReason IgnoreReason False False
ADObjectGuid ADObjectGuid False False
AADObjectId AADObjectId False False
ADLastLogonDate ADLastLogonDate False False
AADLastSignIn AADLastSignIn False False
DisabledDate DisabledDate False False
ReEnabledDate ReEnabledDate False False
JobTitle JobTitle False False
Status Status False False
ResolvedReason ResolvedReason False False
NewAADLastSignIn NewAADLastSignIn False False
AssignedLicenses AssignedLicenses False False
AADCreationType AADCreationType False False
AccountCreated AccountCreated False False
DisplayName DisplayName False False
Email Email False False
AccountType AccountType False False
NewADLastLogonDate NewADLastLogonDate False False
ID ID True False
ContentType Content Type False False
Modified Modified True False
Created Created True False
Author Created By True False
Editor Modified By True False
_UIVersionString Version True False
Attachments Attachments False False
Edit Edit True False
LinkTitleNoMenu Title True False
LinkTitle Title True False
DocIcon Type True False
ItemChildCount Item Child Count True False
FolderChildCount Folder Child Count True False
_ComplianceFlags Label setting True False
_ComplianceTag Retention label True False
_ComplianceTagWrittenTime Retention label Applied True False
_ComplianceTagUserId Label applied by True False
_IsRecord Item is a Record True False
AppAuthor App Created By True False
AppEditor App Modified By True False
My problem is 100% only with adding new items. I wish there was more helpful info in the returned error response. Note, I'm getting the same behavior if I try to do this through the $batch endpoint. Here's the error info available that way:
>$test.responses.body.Error
code message innerError
---- ------- ----------
invalidRequest Invalid request #{date=2021-04-29T14:41:34; request-id=cdf96c25-41e1-437b-9698-64389a2dc36b; client-request-id=cdf96c25-41e1-437b-9698-64389a2dc36b}
...again just 'Invalid Request' :(.
Shamefully this problem was simply the capital "F" in "Fields" in my body. It is case sensitive (evidently). "fields" solved it. I was going to delete the question, but in case it might help someone I'll leave it.

Is there something wrong with floatingFilter in reagent?

I pass floatingFilter as a parameter to agGridReact and setting it to true in defaultColDef but it does not work. Does someone know what is wrong?
:defaultColDef {:sortable true
:editable true
:width deafult-col-w
:filter true
:floatingFilter true}
These are my dependencies:
:dependencies [[org.clojure/clojure "1.9.0"]
[org.clojure/clojurescript "1.10.339"]
[reagent "0.8.1"]
[cljsjs/ag-grid-react "21.0.1-1"]
[cljsjs/ag-grid-community "21.0.1-1"]]
This is the result of my code. Note that I want a row under the columndefinitions, that allows the user to filter.

How to get a list of versions between the latest version and some previous version for a specific object

I'm currently trying to use AWS Tools for PowerShell (https://docs.aws.amazon.com/powershell/latest/reference/index.html) to pull down files from S3.
My question is about how I can get a list of all versions between the latest version and some older version (further on, I will then pull down specific versions of an object to do things with it).
Figuring out the latest version is easy:
(Get-S3ObjectMetadata -BucketName $S3Bucket -Key $file_to_import).VersionId
Also getting a list of all available versions for an object is easy:
(Get-S3Version -BucketName $S3Bucket -Prefix $file_to_import).Versions
This gives me something like this:
BucketName Key IsLatest VersionId
---------- --- -------- ---------
fake_bucket_name test.file True JNvMus2dzvwbHTALXOiROE6eYK2CbQkN
fake_bucket_name test.file False .pLXJQtvTDLn2kGVyzxXLwHo06DM.eOK
fake_bucket_name test.file False E_Pldt5QUK69Bkqi4Vzea5YElVITu5vW
fake_bucket_name test.file False qfHFNcyUPwgQX4Vj.YRUyvKR4iC1LHDN
fake_bucket_name test.file False .Oq9yR3tmY4xeA2sKcbhO5fhbNgTHN_5
fake_bucket_name test.file False IqkH06Z17rJy9b43WKwbdlQmYTIKnQCi
fake_bucket_name test.file False zpd4vZJaP9d8sU2MgOBliDZg5g7dpQI3
fake_bucket_name test.file False aUkj3nf_LHzvF6iJFi6MDP8yN5yZx4s4
fake_bucket_name test.file False voXfE2Yucyfk3lYQxuEHoF531i27rqiw
fake_bucket_name test.file False vpHy533Js8gTBwmVF5Gwfx8gzRHJmuGO
fake_bucket_name test.file False rCLVePiKJ_kG4m99YK6T58OOWPgXYqc6
fake_bucket_name test.file False PQ5pPgMep3qmAhXnApl792OTzOgtEBJp
fake_bucket_name test.file False 8x84RYnc7S5Do0DOZqSC2L42q06yYoSl
fake_bucket_name test.file False LbyQxsfN..p6VmJARs3GZ7aF.Mzh_Q9C
fake_bucket_name test.file False LALPxyI5myYQbnWXv5XSPdnqpDMZp5E8
Where I'm stuck right now is how I can get a list only between the latest version and a specific previous version.
Say, I know I need everything that is newer then VersionId qfHFNcyUPwgQX4Vj.YRUyvKR4iC1LHDN.
So, I would need a list like this:
BucketName Key IsLatest VersionId
---------- --- -------- ---------
fake_bucket_name test.file True JNvMus2dzvwbHTALXOiROE6eYK2CbQkN
fake_bucket_name test.file False .pLXJQtvTDLn2kGVyzxXLwHo06DM.eOK
fake_bucket_name test.file False E_Pldt5QUK69Bkqi4Vzea5YElVITu5vW
I tried using the Get-S3Version command again, making use of the KeyMarker and the VersionIdMarker:
(Get-S3Version -BucketName $S3Bucket -KeyMarker $file_to_import -VersionIdMarker $last_processed_version -Prefix $file_to_import).Versions
But this only gives me all versions BEFORE instead of AFTER the VersionId I used as VersionIdMarker.
The result looks more like this and is the exact opposite of what is needed:
BucketName Key IsLatest VersionId
---------- --- -------- ---------
fake_bucket_name test.file False .Oq9yR3tmY4xeA2sKcbhO5fhbNgTHN_5
fake_bucket_name test.file False IqkH06Z17rJy9b43WKwbdlQmYTIKnQCi
fake_bucket_name test.file False zpd4vZJaP9d8sU2MgOBliDZg5g7dpQI3
fake_bucket_name test.file False aUkj3nf_LHzvF6iJFi6MDP8yN5yZx4s4
fake_bucket_name test.file False voXfE2Yucyfk3lYQxuEHoF531i27rqiw
fake_bucket_name test.file False vpHy533Js8gTBwmVF5Gwfx8gzRHJmuGO
fake_bucket_name test.file False rCLVePiKJ_kG4m99YK6T58OOWPgXYqc6
fake_bucket_name test.file False PQ5pPgMep3qmAhXnApl792OTzOgtEBJp
fake_bucket_name test.file False 8x84RYnc7S5Do0DOZqSC2L42q06yYoSl
fake_bucket_name test.file False LbyQxsfN..p6VmJARs3GZ7aF.Mzh_Q9C
fake_bucket_name test.file False LALPxyI5myYQbnWXv5XSPdnqpDMZp5E8
What is a proper way of getting a list of more recent VersionIds starting with some past VersionId?
Am I just missing something basic?
I don't know if it's too late but I ended up using this:
Get-S3Object -BucketName "my-bucket" -Region my-region | ForEach-Object {
$key = $_.Key
(Get-S3Version -BucketName "my-bucket" -Region my-region).Versions | Where-Object {$_.Key -eq $key} | Sort-Object LastModified
}
This will sort each object by version from latest to oldest. You can increase performance by using -Key "s3-path-to-object" at Get-S3Object

Configuring Grails 3 for Postgresql

I've been trying to get grails 3 to connect to postgres and cannot get a connection.
This is in my build file: runtime "org.postgresql:postgresql:42.2.5"
and the application.yml datasource:
dataSource:
pooled: true
jmxExport: true
driverClassName: 'org.Postgresql.Driver'
dialect: 'org.hibernate.dialect.PostgreSQLDialect'
username: 'okcomputer'
password: ''
environments:
development:
dataSource:
dbCreate: create-drop
url: jdbc:postgresql://localhost:5432/test
test:
dataSource:
dbCreate: update
url: jdbc:postgresql://localhost:5432/test
production:
dataSource:
dbCreate: none
url: jdbc:postgresql://localhost:5432/test
properties:
jmxEnabled: true
initialSize: 5
maxActive: 50
minIdle: 5
maxIdle: 25
maxWait: 10000
maxAge: 600000
timeBetweenEvictionRunsMillis: 5000
minEvictableIdleTimeMillis: 60000
validationQuery: SELECT 1
validationQueryTimeout: 3
validationInterval: 15000
testOnBorrow: true
testWhileIdle: true
testOnReturn: false
jdbcInterceptors: ConnectionState
defaultTransactionIsolation: 2 # TRANSACTION_READ_COMMITTED
What am I doing wrong here? I'm sure the database exists and the user/pass is correct, but am not sure what to do in order to troubleshoot.
A full stack trace is available here: https://pastebin.com/THrALVaE
(I'm using java 1.8 and grails 3.3.8)
Theres a surprisingly small amount of information regarding grails and postgres, so thanks to everyone in advance!
The driver name should probably be org.postgresql.Driver instead of org.Postgresql.Driver. Class names and package names are case sensitive on the JVM.
dataSource:
pooled: true
jmxExport: true
driverClassName: 'org.postgresql.Driver'
dialect: 'org.hibernate.dialect.PostgreSQLDialect'
username: 'okcomputer'
password: ''