Twilio 未通过 AWS Lambda 实时发送 WhatsApp 消息

2023-12-20

很抱歉这篇文章很长,但这只是为了更好地解释,因为英语不是我的母语。

我正在使用 API Gateway + Lambda 通过 POST 请求发送 WhatsApp 消息。

我遇到过这种奇怪的行为。看起来 Twilio 需要在 2 个请求或一段时间后“唤醒”。 我输入了从“1000”、“1001”、“1002”到“1018”的输入,以进行测试和更好地理解。

  • 当我发出请求 1000 和 1001 时,我在 WhatsApp 上没有收到任何信息。
  • 当我发出请求 1002 时,我收到 1000 消息。所以我总是落后 2 条消息。
  • 我会继续直到 1011(我直到 1009 才收到消息)。然后我等待大约 3 分钟或更短时间。
  • 在请求 1012 中,我在 Postman 中收到“内部服务器错误”。 (有时我会收到此错误,有时我会收到正文响应,但 WhatsApp 从未将 1012 作为消息发送(请阅读下一行以更好地理解))。
  • 但我应该收到消息 1010(因为我落后了 2 条消息),但什么也没发生。循环重新启动,我从未收到响应 1010、1011 或 1012。我应该等到请求 1014,才能开始获取消息。

会发生什么?

这是我的 Lambda 代码

///date is 1000, 1001, 1002, 1003, etc. The numbers I have sent manually to test.
'use strict';
console.log('Trying to send a WhatsApp message...');

exports.handler = async (event) => {
    
const accountSid = 'ACa-------------'; 
const authToken = '7e5--------------'; 

const client = require('twilio')("ACa48----------", "7e5d820---------"); 

 let date = "today";
 if (event.queryStringParameters && event.queryStringParameters.date) {
        console.log("Input received is: " + event.queryStringParameters.date);
        fecha = event.queryStringParameters.date;
    }
client.messages 
      .create({ 
         body: date, 
         from: 'whatsapp:+1---------',       
         to: 'whatsapp:+1---------' 
       }) 
      .then(message => console.log("TWILIO RESPONSE SHOULD BE HERE: " + JSON.stringify(message)))
      .done();

  
    let rspbody = date + " is the input";
    
 let responseBody = {
        message: rspbody,
        input: event
    };
let response = {
        statusCode: 200,
        headers: {
            "x-custom-header" : "my custom header value"
        },
        body: JSON.stringify(responseBody),
        "isBase64Encoded": false
    };
    console.log("response LAMBDA: " + JSON.stringify(response));
    return response;
      
};

这是1012请求(最后一个连续请求几分钟后发送的)之后的相关API网关CloudWatch日志(实际上是与成功请求不同的部分)。因此它永远不会通过 API 网关,因此它不会出现在 Lambda 日志(我稍后附上)中。

2021-12-05T20:15:50.171-05:00   (93f6905d-0346-4eff-8b4c-2b03294c6202) Endpoint response headers: {Date=Mon, 06 Dec 2021 01:15:50 GMT, Content-Type=application/json, Content-Length=148, Connection=keep-alive, x-amzn-RequestId=ece04ac8-267b-42fb-ada0-e54e9b6d36c1, X-Amz-Function-Error=Unhandled, x-amzn-Remapped-Content-Length=0, X-Amz-Executed-Version=$LATEST, X-Amzn-Trace-Id=root=1-61ad6446-24dddd3d3b3f9d6c77fdbe4c;sampled=0}

2021-12-05T20:15:50.171-05:00   (93f6905d-0346-4eff-8b4c-2b03294c6202) Endpoint response body before transformations: {"errorMessage":"RequestId: ece04ac8-267b-42fb-ada0-e54e9b6d36c1 Error: Runtime exited with error: exit status 129","errorType":"Runtime.ExitError"}

2021-12-05T20:15:50.171-05:00   (93f6905d-0346-4eff-8b4c-2b03294c6202) Lambda execution failed with status 200 due to customer function error: RequestId: ece04ac8-267b-42fb-ada0-e54e9b6d36c1 Error: Runtime exited with error: exit status 129. Lambda request id: ece04ac8-267b-42fb-ada0-e54e9b6d36c1

2021-12-05T20:15:50.171-05:00   (93f6905d-0346-4eff-8b4c-2b03294c6202) Method completed with status: 502

2021-12-05T20:15:50.171-05:00   (93f6905d-0346-4eff-8b4c-2b03294c6202) AWS Integration Endpoint RequestId : ece04ac8-267b-42fb-ada0-e54e9b6d36c1

这是相关的 Lambda CloudWatch 日志。

2021-12-05T20:13:07.975-05:00   START RequestId: 184f018a-3ca1-46aa-981e-942b1340446c Version: $LATEST

2021-12-05T20:13:08.044-05:00   2021-12-06T01:13:08.025Z 184f018a-3ca1-46aa-981e-942b1340446c INFO Input received is: 1002

2021-12-05T20:13:08.064-05:00   2021-12-06T01:13:08.064Z 184f018a-3ca1-46aa-981e-942b1340446c INFO response LAMBDA: {"statusCode":200,"headers":{"x-custom-header":"my custom header value"},"body":"{\"message\":\"1002 is the input\",\"input\":{\"resource\":\"/helloworld\",\"path\":\"/helloworld\",\"httpMethod\":\"POST\",\"headers\":{\"Accept\":\"*/*\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Authorization\":\"Bearer 3fa2c3d0-e110-11eb-b383-0b0630a03147\",\"Host\":\"ob9nw3nywj.execute-api.us-east-1.amazonaws.com\",\"Postman-Token\":\"8f8ca586-0b46-4882-a633-653a3a964a2b\",\"User-Agent\":\"PostmanRuntime/7.28.4\",\"X-Amzn-Trace-Id\":\"Root=1-61ad63a3-0782456908e458a6435d1ad5\",\"X-Forwarded-For\":\"190.42.19.71\",\"X-Forwarded-Port\":\"443\",\"X-Forwarded-Proto\":\"https\"},\"multiValueHeaders\":{\"Accept\":[\"*/*\"],\"Accept-Encoding\":[\"gzip, deflate, br\"],\"Authorization\":[\"Bearer 3fa2c3d0-e110-11eb-b383-0b0630a03147\"],\"Host\":[\"ob9nw3nywj.execute-api.us-east-1.amazonaws.com\"],\"Postman-Token\":[\"8f8ca586-0b46-4882-a633-653a3a964a2b\"],\"User-Agent\":[\"PostmanRuntime/7.28.4\"],\"X-Amzn-Trace-Id\":[\"Root=1-61ad63a3-0782456908e458a6435d1ad5\"],\"X-Forwarded-For\":[\"190.42.19.71\"],\"X-Forwarded-Port\":[\"443\"],\"X-Forwarded-Proto\":[\"https\"]},\"queryStringParameters\":{\"fecha\":\"1002\"},\"multiValueQueryStringParameters\":{\"fecha\":[\"1002\"]},\"pathParameters\":null,\"stageVariables\":null,\"requestContext\":{\"resourceId\":\"yiygu3\",\"resourcePath\":\"/helloworld\",\"httpMethod\":\"POST\",\"extendedRequestId\":\"J5yBpHOuIAMF_JA=\",\"requestTime\":\"06/Dec/2021:01:13:07 +0000\",\"path\":\"/test/helloworld\",\"accountId\":\"487474028649\",\"protocol\":\"HTTP/1.1\",\"stage\":\"test\",\"domainPrefix\":\"ob9nw3nywj\",\"requestTimeEpoch\":1638753187961,\"requestId\":\"157d7260-fb50-401d-9cd9-b593ddb8a320\",\"identity\":{\"cognitoIdentityPoolId\":null,\"accountId\":null,\"cognitoIdentityId\":null,\"caller\":null,\"sourceIp\":\"190.42.19.71\",\"principalOrgId\":null,\"accessKey\":null,\"cognitoAuthenticationType\":null,\"cognitoAuthenticationProvider\":null,\"userArn\":null,\"userAgent\":\"PostmanRuntime/7.28.4\",\"user\":null},\"domainName\":\"ob9nw3nywj.execute-api.us-east-1.amazonaws.com\",\"apiId\":\"ob9nw3nywj\"},\"body\":null,\"isBase64Encoded\":false}}","isBase64Encoded":false}

2021-12-05T20:13:08.084-05:00   END RequestId: 184f018a-3ca1-46aa-981e-942b1340446c

2021-12-05T20:13:08.084-05:00   REPORT RequestId: 184f018a-3ca1-46aa-981e-942b1340446c Duration: 105.32 ms Billed Duration: 106 ms Memory Size: 256 MB Max Memory Used: 116 MB

2021-12-05T20:13:09.705-05:00   START RequestId: c4e087b5-a26b-4753-9552-98a835658af5 Version: $LATEST

2021-12-05T20:13:09.745-05:00   2021-12-06T01:13:09.745Z 184f018a-3ca1-46aa-981e-942b1340446c INFO TWILIO RESPONSE SHOULD BE HERE: {"body":"1000","numSegments":"1","direction":"outbound-api","from":"whatsapp:+14155238886","to":"whatsapp:+1-------------","dateUpdated":"2021-12-06T01:13:08.000Z","price":null,"errorMessage":null,"uri":"/2010-04-01/Accounts/ACa48---------174df747a33beec1c3/Messages/SMadc43552455a49de88056d84bda32bd7.json","accountSid":"ACa48-------67ec1c3","numMedia":"0","status":"queued","messagingServiceSid":null,"sid":"SMadc43552455a49de88056d84bda32bd7","dateSent":null,"dateCreated":"2021-12-06T01:13:08.000Z","errorCode":null,"priceUnit":null,"apiVersion":"2010-04-01","subresourceUris":{"media":"/2010-04-01/Accounts/ACa48--------4df747a33beec1c3/Messages/SMadc43552455a49de88056d84bda32bd7/Media.json"}}

2021-12-05T20:13:09.746-05:00   2021-12-06T01:13:09.746Z c4e087b5-a26b-4753-9552-98a835658af5 INFO Input received is: 1003

2021-12-05T20:13:09.765-05:00   2021-12-06T01:13:09.765Z c4e087b5-a26b-4753-9552-98a835658af5 INFO response LAMBDA: {"statusCode":200,"headers":{"x-custom-header":"my custom header value"},"body":"{\"message\":\"1003 is the input\",\"input\":{\"resource\":\"/helloworld\",\"path\":\"/helloworld\",\"httpMethod\":\"POST\",\"headers\":{\"Accept\":\"*/*\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Authorization\":\"Bearer 3fa2c3d0-e110-11eb-b383-0b0630a03147\",\"Host\":\"ob9nw3nywj.execute-api.us-east-1.amazonaws.com\",\"Postman-Token\":\"1ec116a0-e65a-4ecf-8dba-aa9f3ae2d1a0\",\"User-Agent\":\"PostmanRuntime/7.28.4\",\"X-Amzn-Trace-Id\":\"Root=1-61ad63a5-160d7e0c02c8cf7f20f35731\",\"X-Forwarded-For\":\"190.42.19.71\",\"X-Forwarded-Port\":\"443\",\"X-Forwarded-Proto\":\"https\"},\"multiValueHeaders\":{\"Accept\":[\"*/*\"],\"Accept-Encoding\":[\"gzip, deflate, br\"],\"Authorization\":[\"Bearer 3fa2c3d0-e110-11eb-b383-0b0630a03147\"],\"Host\":[\"ob9nw3nywj.execute-api.us-east-1.amazonaws.com\"],\"Postman-Token\":[\"1ec116a0-e65a-4ecf-8dba-aa9f3ae2d1a0\"],\"User-Agent\":[\"PostmanRuntime/7.28.4\"],\"X-Amzn-Trace-Id\":[\"Root=1-61ad63a5-160d7e0c02c8cf7f20f35731\"],\"X-Forwarded-For\":[\"190.42.19.71\"],\"X-Forwarded-Port\":[\"443\"],\"X-Forwarded-Proto\":[\"https\"]},\"queryStringParameters\":{\"fecha\":\"1003\"},\"multiValueQueryStringParameters\":{\"fecha\":[\"1003\"]},\"pathParameters\":null,\"stageVariables\":null,\"requestContext\":{\"resourceId\":\"yiygu3\",\"resourcePath\":\"/helloworld\",\"httpMethod\":\"POST\",\"extendedRequestId\":\"J5yB6EtBoAMF96Q=\",\"requestTime\":\"06/Dec/2021:01:13:09 +0000\",\"path\":\"/test/helloworld\",\"accountId\":\"487474028649\",\"protocol\":\"HTTP/1.1\",\"stage\":\"test\",\"domainPrefix\":\"ob9nw3nywj\",\"requestTimeEpoch\":1638753189693,\"requestId\":\"e2d9d7ec-56d3-4685-8590-aa1d5fb2038b\",\"identity\":{\"cognitoIdentityPoolId\":null,\"accountId\":null,\"cognitoIdentityId\":null,\"caller\":null,\"sourceIp\":\"190.42.19.71\",\"principalOrgId\":null,\"accessKey\":null,\"cognitoAuthenticationType\":null,\"cognitoAuthenticationProvider\":null,\"userArn\":null,\"userAgent\":\"PostmanRuntime/7.28.4\",\"user\":null},\"domainName\":\"ob9nw3nywj.execute-api.us-east-1.amazonaws.com\",\"apiId\":\"ob9nw3nywj\"},\"body\":null,\"isBase64Encoded\":false}}","isBase64Encoded":false}

2021-12-05T20:13:09.766-05:00   END RequestId: c4e087b5-a26b-4753-9552-98a835658af5

2021-12-05T20:13:09.766-05:00   REPORT RequestId: c4e087b5-a26b-4753-9552-98a835658af5 Duration: 59.03 ms Billed Duration: 60 ms Memory Size: 256 MB Max Memory Used: 117 MB

正如您所看到的,“1000”(TWILIO RESPONSE SHOULD BE HERE)消息是在发送 1002 resuest 后创建的。

这是 1012 请求后的 Lambda 日志。

2021-12-05T20:15:50.118-05:00   START RequestId: ece04ac8-267b-42fb-ada0-e54e9b6d36c1 Version: $LATEST

2021-12-05T20:15:50.121-05:00   2021-12-06T01:15:50.121Z fc58a37e-33bd-47d0-bade-d311d26aad86 ERROR Uncaught Exception {"message":"timeout of 30000ms exceeded","name":"Error","stack":"Error: timeout of 30000ms exceeded\n at createError (/opt/nodejs/node_modules/axios/lib/core/createError.js:16:15)\n at ClientRequest.handleRequestTimeout (/opt/nodejs/node_modules/axios/lib/adapters/http.js:303:16)\n at Object.onceWrapper (events.js:519:28)\n at ClientRequest.emit (events.js:400:28)\n at TLSSocket.emitRequestTimeout (_http_client.js:790:9)\n at Object.onceWrapper (events.js:519:28)\n at TLSSocket.emit (events.js:412:35)\n at TLSSocket.Socket._onTimeout (net.js:495:8)\n at listOnTimeout (internal/timers.js:557:17)\n at processTimers (internal/timers.js:500:7)","config":{"url":"https://api.twilio.com/2010-04-01/Accounts/ACa------4df747a33beec1c3/Messages.json","method":"post","data":"To=whatsapp%3A%2B51-----273&From=whatsapp%3A%2B14155238886&Body=1009","headers":{"Accept":"application/json","Content-Type":"application/x-www-form-urlencoded","User-Agent":"twilio-node/3.71.3 (linux x64) node/v14.18.1","Accept-Charset":"utf-8","Connection":"close","Authorization":"Basic QUNhNDgxOGQ4MmE0ZDY3YTE3NGRmNzQ3YTMzYmVlYzFjMzo3ZTVkODIwNTk2OGFmMTFkNTM5M2NlMzBhNjYzNjk4OQ==","Content-Length":69},"proxy":false,"transformRequest":[null],"transformResponse":[null],"timeout":30000,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1,"maxRedirects":0,"transitional":{"silentJSONParsing":true,"forcedJSONParsing":true,"clarifyTimeoutError":false}},"code":"ECONNABORTED"}

2021-12-05T20:15:50.125-05:00   [ERROR] [1638753350125] LAMBDA_RUNTIME Failed to post handler success response. Http response code: 400.

2021-12-05T20:15:50.169-05:00   END RequestId: ece04ac8-267b-42fb-ada0-e54e9b6d36c1

2021-12-05T20:15:50.169-05:00   REPORT RequestId: ece04ac8-267b-42fb-ada0-e54e9b6d36c1 Duration: 47.66 ms Billed Duration: 48 ms Memory Size: 256 MB Max Memory Used: 118 MB

2021-12-05T20:15:50.169-05:00   RequestId: ece04ac8-267b-42fb-ada0-e54e9b6d36c1 Error: Runtime exited with error: exit status 129 Runtime.ExitError

2021-12-05T20:15:50.400-05:00   2021-12-06T01:15:50.400Z undefined INFO Trying to send a WhatsApp message...

2021-12-05T20:15:51.756-05:00   START RequestId: 89f858ae-e5ae-45dc-af37-e911458ac0d0 Version: $LATEST

2021-12-05T20:15:56.829-05:00   2021-12-06T01:15:56.829Z 89f858ae-e5ae-45dc-af37-e911458ac0d0 INFO Input received is: 1013

2021-12-05T20:15:57.007-05:00   2021-12-06T01:15:57.007Z 89f858ae-e5ae-45dc-af37-e911458ac0d0 INFO response LAMBDA: {"statusCode":200,"headers":{"x-custom-header":"my custom header value"},"body":"{\"message\":\"1013 is the input\",\"input\":{\"resource\":\"/helloworld\",\"path\":\"/helloworld\",\"httpMethod\":\"POST\",\"headers\":{\"Accept\":\"*/*\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Authorization\":\"Bearer 3fa2c3d0-e110-11eb-b383-0b0630a03147\",\"Host\":\"ob9nw3nywj.execute-api.us-east-1.amazonaws.com\",\"Postman-Token\":\"2bcec7b9-d27a-4003-b2f3-1c69902877d3\",\"User-Agent\":\"PostmanRuntime/7.28.4\",\"X-Amzn-Trace-Id\":\"Root=1-61ad6447-2f4899486209116835f244bc\",\"X-Forwarded-For\":\"190.42.19.71\",\"X-Forwarded-Port\":\"443\",\"X-Forwarded-Proto\":\"https\"},\"multiValueHeaders\":{\"Accept\":[\"*/*\"],\"Accept-Encoding\":[\"gzip, deflate, br\"],\"Authorization\":[\"Bearer 3fa2c3d0-e110-11eb-b383-0b0630a03147\"],\"Host\":[\"ob9nw3nywj.execute-api.us-east-1.amazonaws.com\"],\"Postman-Token\":[\"2bcec7b9-d27a-4003-b2f3-1c69902877d3\"],\"User-Agent\":[\"PostmanRuntime/7.28.4\"],\"X-Amzn-Trace-Id\":[\"Root=1-61ad6447-2f4899486209116835f244bc\"],\"X-Forwarded-For\":[\"190.42.19.71\"],\"X-Forwarded-Port\":[\"443\"],\"X-Forwarded-Proto\":[\"https\"]},\"queryStringParameters\":{\"fecha\":\"1013\"},\"multiValueQueryStringParameters\":{\"fecha\":[\"1013\"]},\"pathParameters\":null,\"stageVariables\":null,\"requestContext\":{\"resourceId\":\"yiygu3\",\"resourcePath\":\"/helloworld\",\"httpMethod\":\"POST\",\"extendedRequestId\":\"J5ybPH8IoAMFkWQ=\",\"requestTime\":\"06/Dec/2021:01:15:51 +0000\",\"path\":\"/test/helloworld\",\"accountId\":\"487474028649\",\"protocol\":\"HTTP/1.1\",\"stage\":\"test\",\"domainPrefix\":\"ob9nw3nywj\",\"requestTimeEpoch\":1638753351743,\"requestId\":\"32a656fb-4ae3-4b18-8d8b-68e5880562e7\",\"identity\":{\"cognitoIdentityPoolId\":null,\"accountId\":null,\"cognitoIdentityId\":null,\"caller\":null,\"sourceIp\":\"190.42.19.71\",\"principalOrgId\":null,\"accessKey\":null,\"cognitoAuthenticationType\":null,\"cognitoAuthenticationProvider\":null,\"userArn\":null,\"userAgent\":\"PostmanRuntime/7.28.4\",\"user\":null},\"domainName\":\"ob9nw3nywj.execute-api.us-east-1.amazonaws.com\",\"apiId\":\"ob9nw3nywj\"},\"body\":null,\"isBase64Encoded\":false}}","isBase64Encoded":false}

2021-12-05T20:15:57.166-05:00   END RequestId: 89f858ae-e5ae-45dc-af37-e911458ac0d0

2021-12-05T20:15:57.166-05:00   REPORT RequestId: 89f858ae-e5ae-45dc-af37-e911458ac0d0 Duration: 5407.73 ms Billed Duration: 5408 ms Memory Size: 256 MB Max Memory Used: 65 MB

这些是 WhatsApp 消息,可帮助您更好地了解故障排除。

[20:13, 12/5/2021] +1 (415) 523-8886: 1000
[20:13, 12/5/2021] +1 (415) 523-8886: 1001
[20:13, 12/5/2021] +1 (415) 523-8886: 1002
[20:13, 12/5/2021] +1 (415) 523-8886: 1003
[20:13, 12/5/2021] +1 (415) 523-8886: 1004
[20:13, 12/5/2021] +1 (415) 523-8886: 1005
[20:13, 12/5/2021] +1 (415) 523-8886: 1006
[20:13, 12/5/2021] +1 (415) 523-8886: 1007
[20:13, 12/5/2021] +1 (415) 523-8886: 1008
[20:13, 12/5/2021] +1 (415) 523-8886: 1009
[20:15, 12/5/2021] +1 (415) 523-8886: 1013
[20:16, 12/5/2021] +1 (415) 523-8886: 1014
[20:16, 12/5/2021] +1 (415) 523-8886: 1015

请帮忙。如果您需要更多信息,请告诉我。

提前致谢。


Answer recommended by Twilio /collectives/twilio Collective

我认为这里的问题是您在对 Twilio API 的异步请求完成之前从 Lambda 返回。您最终会收到原始请求,因为 AWS 似乎会在 Lambda 完成时暂停事件循环,然后在新的 Lambda 再次启动时恢复事件循环。

我相信你可以通过添加来解决这个问题await调用 Twilio API 之前的关键字。

await client.messages
  .create({
    body: date,
    from: "whatsapp:+1---------",
    to: "whatsapp:+1---------",
  })
  .then((message) =>
    console.log("TWILIO RESPONSE SHOULD BE HERE: " + JSON.stringify(message))
  )

你可能应该添加一个try/catch也围绕 API 调用,以便您可以处理 API 错误。

这应该可以解决你之前的问题也是 https://stackoverflow.com/questions/70231566/task-timed-out-after-x-seconds-error-with-lambda-aws-and-twilio-for-whatsapp-m.

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Twilio 未通过 AWS Lambda 实时发送 WhatsApp 消息 的相关文章

随机推荐

  • Webpack - 使用 CopyWebpackPlugin 将文件从源复制到公共

    我有一个正在使用 Webpack 的应用程序 在此应用程序中 我需要从我的各个目录中复制一些静态 html 文件source目录到同一层次结构public目录 为了尝试做到这一点 我正在使用复制Webpack插件 https github
  • C++ 编译时一个类的子类列表

    我正在考虑如何创建从模板基类派生的所有类的列表 首先我想要一个模板基类 template
  • Cygwin64 上的 Python 2.7.5:请求安装失败

    我们的项目主要是基于 J2EE 的开发 并使用 Python 编写的自动功能和集成测试 测试环境是Linux 但开发人员使用Windows 7 64位 我们希望也能够在开发人员机器上执行功能测试 在提交之前 不幸的是pexpect wind
  • JavaScript 变量的生命周期

    JavaScript 中用 var 声明的变量的生命周期是多少 我确信 这绝对不符合预期 JavaScript 如何以及何时垃圾收集变量a Since a是内部函数闭包的一部分 理想情况下它永远不应该被垃圾收集 因为内部函数fun 可以作为
  • .NET MAUI 中的页眉和页脚

    我想做与这个问题相同的事情 但是对于 NET MAUI 所有 WPF 窗口中的页眉和页脚相同 https stackoverflow com questions 20113405 same header footer in all wpf
  • 如何使用WebRTC停止屏幕共享?

    我在用着获取用户媒体 https developer mozilla org en US docs Web API Navigator getUserMedia访问屏幕共享 当用户单击停止按钮时 我想停止屏幕共享 根据媒体流API http
  • 如何在div上创建不均匀的圆角?

    我一直在尝试制作一个具有不均匀圆边的 DIV 如下所示 我检查了一些解决方案 最接近的解决方案是使用 border radius 我用过 border bottom left radius 80 50px border bottom rig
  • 无法将 Intellij 与生成的源文件夹一起使用

    相关问题如何配置 IntelliJ IDEA 和 或 Maven 自动添加包含使用 jaxb2 maven plugin 生成的 Java 源代码的目录 https stackoverflow com questions 2644609 h
  • 在 gmail 中通过 PHP 登录时电子邮件尝试失败

    我需要用 PHP 发送电子邮件的帮助 我实际上正在尝试使用 PHP 邮件程序发送电子邮件 不知何故 某些邮件 ID 能够发送电子邮件 但其他一些电子邮件 ID 无法发送 我在 Gmail 中收到一封电子邮件 指出 登录尝试被阻止 有人可以帮
  • 需要 ANSI 92 递归 SQL 语句

    我目前正在将 SQL Server SQL 语句转换为其 ANSI 通用等效项 并且一直坚持使用WITH 语句的递归语句 为了集中讨论这个问题 我将问题简化如下 如果我有两张桌子 报告单位 col1 关键 col2 ParentReport
  • 有终结器但没有 IDisposable 的单例

    这是我从 CLR via C Effective C 和其他资源中对 IDisposable 和终结器的理解 IDisposable 用于确定性地清理托管和非托管资源 负责非托管资源 例如文件句柄 的类应该实现 IDisposable 并提
  • 在视图下方显示 toast 小部件

    对于那些之前在这个项目上帮助过我的人 非常感谢 我的代码不再有任何问题 并且我做了额外的调整 现在该应用程序实际上已经很强大了 我还想做一件事 请参阅屏幕截图layout https i stack imgur com NJW9Y jpg
  • 从 Windows C 函数返回字符串

    我对 C 和 C 中的纯 Windows API 级函数完全是新手 最近一直在尝试 NET 互操作性 我已经构建了一个简单的库 它已成功地将数值 int float 等 返回给 NET 调用者 但我在字符串方面没有那么幸运 我尝试了各种不同
  • jQuery Mobile 重用标题和导航

    我是 jQuery Mobile 的新手 在理解重用标题和常规导航时遇到问题 所以我创建了一个标题 其右侧有一个菜单按钮 单击此菜单栏时 会出现一个弹出窗口 其中包含其他页面的链接 div h1 Home h1 a href popupMe
  • 使用带有 '\xae' 的元素转义列表并打印结果

    我有一个清单L u steve u micheal u pedro xae 当我尝试阅读它时 出现错误 我相信它与 xae 有关 gt gt gt L u steve u micheal u pedro xae gt gt gt gt gt
  • 从java voip开始[关闭]

    很难说出这里问的是什么 这个问题是含糊的 模糊的 不完整的 过于宽泛的或修辞性的 无法以目前的形式得到合理的回答 如需帮助澄清此问题以便重新打开 访问帮助中心 help reopen questions 我必须编写一个聊天应用程序 能够使用
  • 无法 npm 安装 canvas [Windows 上的 NodeJs]?

    我正在尝试使用 ag psd 包来操作 psd 文件 它仅适用于结构 但如果您也想读取图像数据 则会遇到错误 错误如下 Cannot find module canvas code MODULE NOT FOUND 但如果我尝试安装画布 我
  • 每个派生表必须有自己的别名 - 来自组合降序 MySQL 的错误

    我想通过来自两个不同列的两个 strtotime 时间戳对一个 mysql 表进行排序 我有以下 mysql 命令 SELECT FROM SELECT 1 AS table vid req timestamp AS timestamp t
  • 失败 [INSTALL_FAILED_INVALID_APK]

    当我单击运行刚刚在 Android Studio 0 2 10 中创建的项目并选择我的 Android 通过 USB 连接并通过 USB 进行调试 时 出现以下错误 Waiting for device Target device 0123
  • Twilio 未通过 AWS Lambda 实时发送 WhatsApp 消息

    很抱歉这篇文章很长 但这只是为了更好地解释 因为英语不是我的母语 我正在使用 API Gateway Lambda 通过 POST 请求发送 WhatsApp 消息 我遇到过这种奇怪的行为 看起来 Twilio 需要在 2 个请求或一段时间