Problem with declaring sample contract to starknet testnet - starknet

I'm trying to declare the sample contract as defined here:
https://www.cairo-lang.org/docs/hello_starknet/intro.html#declare-contract
When invoking the
starknet declare --contract contract_compiled.json
I'm still getting:
Got BadRequest while trying to access https://alpha4.starknet.io/feeder_gateway/simulate_transaction?blockNumber=pending. Status code: 500; text: {"code": "StarknetErrorCode.UNINITIALIZED_CONTRACT", "message": "Requested contract address [redacted] is not deployed."}.
Traceback (most recent call last):
File "/Users/[redacted]/cairo_venv/lib/python3.9/site-packages/services/external_api/client.py", line 117, in _send_request
raise BadRequest(status_code=response.status, text=text)
services.external_api.client.BadRequest: HTTP error ocurred. Status: 500. Text: {"code": "StarknetErrorCode.UNINITIALIZED_CONTRACT", "message": "Requested contract address [redacted] is not deployed."}
Error: BadRequest: HTTP error ocurred. Status: 500. Text: {"code": "StarknetErrorCode.UNINITIALIZED_CONTRACT", "message": "Requested contract address [redacted] is not deployed."}
I'm expecting to have that being worked :)
I've set everything as it's described in the tutorial above.

As mentionned by user amanusk, you need a funded account with some ETH in order to be able to declare contract classes.
This error happens because you either did not declare an account contract in your CLI yet, or because you haven't sent ETH on it yet, and so it is not initialized.
Make sure to:
Create an account usable with your CLI
Fund it with some ETH
Check that it appears as deployed in an explorer

Related

Airflow Slack failed to send Message

I am trying to achieve Airflow integration with Slack,
have received the webhook URL, and created the connection as below. Why is it showing google.com ??
Why is it using the default http_conn_id and connecting to google ??
But got an error as below
ERROR - Error in sending a message to Slack channel #airflow-alerts
by Airflow: 404:Not Found
{base_hook.py:83} INFO - Using connection to: id: http_default. Host: https://www.google.com/, Port: None, Schema: None, Login: None, Password: None, extra: {}
{logging_mixin.py:95} INFO - [2020-05-29 12:43:21,374] {http_hook.py:128} INFO - Sending 'POST' to url: https://www.google.com//T00A6ASFHD8S/G1FDF4K/a3zfKsadfsrScxgadfsdafOIgIvgW
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://www.google.com//T00A6ASFHD8S/G1FDF4K/a3zfKsadfsrScxgadfsdafOIgIvgW
But I got the below error, unable to figure out
Your connection is not setup correctly, you need to select HTTP as the Conn Type, leave the Extra field blank and put the webhook token (format is /STRING/STRING/STRING) in the Password field. Then you can use the SlackWebhookOperator operator which allows you to set the channel and username.
I finally figured out after long struggle ...
There was a bug in SlackWebhookOperator in Airflow≤1.10.3 (Bug Jira Issue). This was fixed in 1.10.4 with this PR (fix commit).

SSL error when creating vue.js app using api platform client generator

I tried to create client app of my API created using API Platform. I follow this guide https://api-platform.com/docs/client-generator/vuejs/.
I use Laravel Homestead for the VM when developing it.
I've added myapp .crt file to Keychan Access.
Problem was, when I try to execute
generate-api-platform-client --generator vue https://myapp-api.local/api src/
It return error message like this:
{
api: Api { entrypoint: 'https://myapp-api.local/api', resources: [] },
error: FetchError: request to https://myapp-api.local/api failed, reason: unable to verify the first certificate
at ClientRequest.<anonymous> (/Users/permana.jayanta/.config/yarn/global/node_modules/node-fetch/index.js:133:11)
at ClientRequest.emit (events.js:209:13)
at TLSSocket.socketErrorListener (_http_client.js:406:9)
at TLSSocket.emit (events.js:209:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
name: 'FetchError',
message: 'request to https://myapp-api.local/api failed, reason: unable to verify the first certificate',
type: 'system',
errno: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE',
code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE'
},
response: undefined,
status: undefined
}
I'm thinking this is related with SSL certificate. That node doesn't recognise the certificate. How to make node.js recognise the custom SSL certificate generated by Homestead?
it failed to verify https signature.
To disable it, type in shell
export NODE_TLS_REJECT_UNAUTHORIZED=0

Session not created error with physical device

I've been trying to run automated tests with Appium, they are already running in physical devices, but I get the error: [WD Proxy] Got an unexpected response: {"value":{"error":"session not created","message":"'capabilities' is mandatory to create a new session"}
I've gone through the configuration guide and the webDriverAgent seems to be running correctly in the device, when I make a request to the webdriveragent running on the device I get the response:
[WD Proxy] Determined that the downstream protocol for proxy is W3C
[XCUITest] WebDriverAgent information:
[XCUITest] {
[XCUITest] "message": "WebDriverAgent is ready to accept commands",
[XCUITest] "state": "success",
However, when Appium makes the request to create a new WDA session, receives the following response:
[WD Proxy] Got an unexpected response: {"value":{"error":"session not created","message":"'capabilities' is mandatory to create a new session"},"sessionId":"595F87C8-0564-4B75-94B4-7D67BA0AF382"}
Using these capabilities
'app': app,
'bundleId' : bundle_id,
'platformName': platform_name,
'automationName': automation_name,
'platformVersion': platform_version,
'deviceName': device_name,
'udid': udid,
'xcodeOrgId': xcode_org_id,
'xcodeSigningId': xcode_signing_id,
'newCommandTimeout': new_command_timeout,
'updatedWDABundleId': updated_WDA_Bundle_Id,
'agentPath': "/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj",
'bootstrapPath': "/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent"
Is there anything else I might be missing?
Not sure if these capabilities are actually required:
'updatedWDABundleId': updated_WDA_Bundle_Id,
'agentPath': "/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj",
'bootstrapPath': "/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent"
try removing them, also in my tests i have noticed that it is necessary to restart the appium server everytime you switch from real device to simulator.
Hope it helps

Why does Openstack swift swift-recon -rla command gives HTTP Error 400: Bad Request

I am told by this documentation below that running swift-recon -rla on the swift_proxy_server can help determine if I have a healthy swift system
[https://docs.openstack.org/swift/latest/ops_runbook/maintenance.html][1]
But when I run swift-recon -rla I get the output below
(swift-proxy-server)[root#openstackstorage1 /]# swift-recon -rla
===============================================================================
--> Starting reconnaissance on 1 hosts (object)
===============================================================================
[2018-01-30 21:00:26] Checking async pendings
-> http://170.28.9.7:6000/recon/async: HTTP Error 400: Bad Request
[async_pending] - No hosts returned valid data.
===============================================================================
[2018-01-30 21:00:26] Checking on replication
-> http://170.28.9.7:6000/recon/replication/object: HTTP Error 400: Bad Request
[failure] - No hosts returned valid data.
[success] - No hosts returned valid data.
[replication_time] - No hosts returned valid data.
[attempted] - No hosts returned valid data.
===============================================================================
[2018-01-30 21:00:26] Checking load averages
-> http://170.28.9.7:6000/recon/load: HTTP Error 400: Bad Request
[5m_load_avg] - No hosts returned valid data.
[15m_load_avg] - No hosts returned valid data.
[1m_load_avg] - No hosts returned valid data.
===============================================================================
Anybody know what this means and what action I need to take to trouble shoot this or fix it??

Unable to send a message using BTAHL72XSendPipeline

I have a recieve port, and location accepting an HL7 2.x message over MLLP. I have created a party, and configured the acknowledgement settings using the BTAHL7 configuration explorer. The message parses fine, ACKS are returned to the originating system and I am able to send the deserialized xml to a file using a passthrough pipeline, and send the resulting ACKs to a file also using a passthrough pipeline, so I can confirm successful reception parsing and validation of the inbound xml.
As a simple test, I create a send port using the BTAHL72XSendPipeline to dump the HL7 2.x message to a file. To do this, I put a filter on the send port
BTS.MessageType ==
http://microsoft.com/HealthCare/HL7/2X#ADT_A04_21_GLO_DEF
And I recieve the following parsing errors, which I don't understand because the message parsed fine when I received it:
There was a failure executing the send pipeline:
"BTAHL72XPipelines.BTAHL72XSendPipeline, BTAHL72XPipelines, Version=1.3.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Source: "BTAHL7 2.X Assembler"
Send Port: "Send.HL7" URI: "C:\Demo\HL7\In\HL7\%MessageID%.txt"
Reason: Serialization errors:
Error # 1
Segment Id: NK1_NextOfKin
Sequence Number: 1
Field Number: 5
Error Number: 207
Error Description: Application internal error
Encoding System: HL7nnnn
Alternate Error Number: Z100
Alternate Error Description: Trailing delimiter found
Alternate Encoding System: HL7-BTA
Error # 2
Segment Id: PV1_PatientVisit
Sequence Number: 1
Field Number: 45
Error Number: 207
Error Description: Application internal error
Encoding System: HL7nnnn
Alternate Error Number: Z100
Alternate Error Description: Trailing delimiter found
Alternate Encoding System: HL7-BTA
Right click on your send pipeline and choose properties then click on the ".." button next to the Send pipeline and select "true" for the "TrailingDelmitierAllowed" option. Also make sure these are checked on the receive pipeline.

Resources