<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: DIGITAL SQUAD</title>
    <description>The latest articles on DEV Community by DIGITAL SQUAD (@digitalsquad).</description>
    <link>https://dev.to/digitalsquad</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F90551%2F9255cbe9-bca0-495e-b1e1-f99181c7e0e1.jpg</url>
      <title>DEV Community: DIGITAL SQUAD</title>
      <link>https://dev.to/digitalsquad</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/digitalsquad"/>
    <language>en</language>
    <item>
      <title>Hot to fix Let's encrypt error Deserialization error: Status not recognized. </title>
      <dc:creator>DIGITAL SQUAD</dc:creator>
      <pubDate>Tue, 22 Jan 2019 10:34:04 +0000</pubDate>
      <link>https://dev.to/digitalsquad/hot-to-fix-lets-encrypt-error-deserialization-error-status-not-recognized--h9m</link>
      <guid>https://dev.to/digitalsquad/hot-to-fix-lets-encrypt-error-deserialization-error-status-not-recognized--h9m</guid>
      <description>&lt;p&gt;I've got an error when testing renew certification.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$sudo certbot renew --dry-run

Saving debug log to /var/log/letsencrypt/letsencrypt.log
-------------------------------------------------------------------------------
Processing /etc/letsencrypt/renewal/mydomain.com.conf
-------------------------------------------------------------------------------
Cert is due for renewal, auto-renewing...
Plugins selected: Authenticator nginx, Installer nginx
Starting new HTTPS connection (1): acme-staging-v02.api.letsencrypt.org
Renewing an existing certificate
Attempting to renew cert (mydomain.com) from /etc/letsencrypt/renewal/mydomain.com.conf produced an unexpected error: Deserialization error: Could not decode 'status' (u'ready'): Deserialization error: Status not recognized. Skipping.
All renewal attempts failed. The following certs could not be renewed:
  /etc/letsencrypt/live/mydomain.com/fullchain.pem (failure)
-------------------------------------------------------------------------------
** DRY RUN: simulating 'certbot renew' close to cert expiry
**          (The test certificates below have not been saved.)
All renewal attempts failed. The following certs could not be renewed:
  /etc/letsencrypt/live/mydomain.com/fullchain.pem (failure)
** DRY RUN: simulating 'certbot renew' close to cert expiry
**          (The test certificates above have not been saved.)
-------------------------------------------------------------------------------
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;At the first time, renew command finished successfully, but return errors at the second time.&lt;br&gt;
This error seems to occur on certbot which version is lower than 0.25.&lt;br&gt;
To fix this error update certbot package.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo yum update certbot -y
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</description>
      <category>letsencrypt</category>
      <category>ssl</category>
    </item>
    <item>
      <title>Testing React Native app includes react-native-cookies with Jest</title>
      <dc:creator>DIGITAL SQUAD</dc:creator>
      <pubDate>Mon, 24 Sep 2018 09:00:10 +0000</pubDate>
      <link>https://dev.to/digitalsquad/testing-react-native-app-includes-react-native-cookies-with-jest-1ao7</link>
      <guid>https://dev.to/digitalsquad/testing-react-native-app-includes-react-native-cookies-with-jest-1ao7</guid>
      <description>&lt;p&gt;When got an error below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Test suite failed to run

    Invariant Violation: react-native-cookies: Add RNCookieManagerIOS.h and RNCookieManagerIOS.m to your Xcode project

      1 | import { Alert, AsyncStorage, FlatList, Platform, StyleSheet, Text, View } from 'react-native'
    &amp;gt; 2 | import CookieManager from 'react-native-cookies'
        |                                                              ^
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add &lt;strong&gt;setup.js&lt;/strong&gt; anywhere on project root directory or somewhere.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;jest.mock('react-native-cookies', () =&amp;gt; {
  return {
    addEventListener: jest.fn(),
    removeEventListener: jest.fn(),
    openURL: jest.fn(),
    canOpenURL: jest.fn(),
    getInitialURL: jest.fn(),
  }
})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Modify &lt;strong&gt;package.json&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; "jest": {
    "preset": "react-native",
    "moduleDirectories": [
      "node_modules",
      "src",
      "test"
    ],
    "setupFiles": [
      "&amp;lt;rootDir&amp;gt;/setup.js"
    ]
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://github.com/joeferraro/react-native-cookies/issues/16#issuecomment-348448319"&gt;'Invariant Violation' exception when running tests&lt;/a&gt;&lt;/p&gt;

</description>
      <category>reactnative</category>
      <category>jest</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Fix problems on running Jest with React native v0.56</title>
      <dc:creator>DIGITAL SQUAD</dc:creator>
      <pubDate>Fri, 21 Sep 2018 12:30:43 +0000</pubDate>
      <link>https://dev.to/digitalsquad/fix-problems-on-running-jest-with-react-native-v056-2656</link>
      <guid>https://dev.to/digitalsquad/fix-problems-on-running-jest-with-react-native-v056-2656</guid>
      <description>&lt;p&gt;The combination of Jest and React native version 0.56 may have some problems and these steps should be fix those problems.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yarn test
yarn run v1.7.0
$ jest
 FAIL  __tests__/timeline_form_screen_test.js
  ● Test suite failed to run

  Plugin 0 specified in "/ReactNative/AppName/node_modules/babel-preset-react-native/index.js" provided an invalid property of "default" (While processing preset: "/ReactNative/AppName/node_modules/babel-preset-react-native/index.js")

      at Plugin.init (node_modules/babel-core/lib/transformation/plugin.js:131:13)
      at Function.normalisePlugin (node_modules/babel-core/lib/transformation/file/options/option-manager.js:152:12)
      at node_modules/babel-core/lib/transformation/file/options/option-manager.js:184:30
          at Array.map (&amp;lt;anonymous&amp;gt;)
      at Function.normalisePlugins (node_modules/babel-core/lib/transformation/file/options/option-manager.js:158:20)
      at OptionManager.mergeOptions (node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:36)
      at node_modules/babel-core/lib/transformation/file/options/option-manager.js:265:14
      at node_modules/babel-core/lib/transformation/file/options/option-manager.js:323:22
          at Array.map (&amp;lt;anonymous&amp;gt;)
      at OptionManager.resolvePresets (node_modules/babel-core/lib/transformation/file/options/option-manager.js:275:20)

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you got erro above, rename &lt;strong&gt;.babelrc&lt;/strong&gt; to &lt;strong&gt;.babel.config.js&lt;/strong&gt; on your React Native project root and will fix the error.&lt;/p&gt;

&lt;p&gt;However still may have another error.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; /ReactNative/AppName/__tests__/component_test.js:1
    ({"Object.&amp;lt;anonymous&amp;gt;":function(module,exports,require,__dirname,__filename,global,jest){import React from 'react';
                                                                                                    ^^^^^

    SyntaxError: Unexpected identifier

      at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/script_transformer.js:403:17)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Modify package.json like below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"jest": {
    "preset": "react-native"
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;to&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"jest": {
    "preset": "react-native",
    "transform": {
      "^.+\\.js$": "&amp;lt;rootDir&amp;gt;/node_modules/react-native/jest/preprocessor.js"
    }
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then it will fix the error.&lt;/p&gt;

</description>
      <category>reactnative</category>
      <category>jest</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
