<?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: Gyana Ranjan panda</title>
    <description>The latest articles on DEV Community by Gyana Ranjan panda (@meditatingpanda).</description>
    <link>https://dev.to/meditatingpanda</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%2F678917%2F9b4dc959-03a9-42f1-aafe-aaa2a8a8f4de.png</url>
      <title>DEV Community: Gyana Ranjan panda</title>
      <link>https://dev.to/meditatingpanda</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/meditatingpanda"/>
    <language>en</language>
    <item>
      <title>Content Security Policy Nightmare</title>
      <dc:creator>Gyana Ranjan panda</dc:creator>
      <pubDate>Sat, 21 May 2022 15:29:54 +0000</pubDate>
      <link>https://dev.to/meditatingpanda/content-security-policy-nightmare-f9b</link>
      <guid>https://dev.to/meditatingpanda/content-security-policy-nightmare-f9b</guid>
      <description>&lt;h2&gt;
  
  
  How a simple package can give you sleepless night
&lt;/h2&gt;

&lt;p&gt;Must be thinking about how is this possible? let me give you some details first:-&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_d-MbR-l--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vprhpzarj3g1xutv2n5i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_d-MbR-l--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vprhpzarj3g1xutv2n5i.png" alt="Bug Details" width="880" height="410"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Looking Scary right🥶, basically i am working on a chrome extension and everything going smooth and one day the devil arise.&lt;/p&gt;

&lt;p&gt;The extension was basically a search enhancer Felvin :-&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6nD2O7Em--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3920gy8okakwqsw8el75.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6nD2O7Em--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3920gy8okakwqsw8el75.png" alt="Image description" width="880" height="419"&gt;&lt;/a&gt;&lt;br&gt;
Like above example it provides lot of dev utilities   around 72(csv to json,image crop,code reference ,corn parser,image compressor) all in your search bar.&lt;br&gt;
Link:&lt;a href="https://chrome.google.com/webstore/detail/felvin-google-search-enha/dmhgpjahhfannndnaghleelgnpieiljl"&gt;Chrome Store&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So one day a new version was rolled out then suddenly it throws the above error. So figuring out among 72 apps which causes this.&lt;/p&gt;

&lt;p&gt;Those who not aware about CSP policies by google. for them&lt;br&gt;
The content security policy for Chrome Apps restricts you from doing the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;You can't use inline scripting and event handlers like &lt;strong&gt;onClick&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Can't use eval() and new Function()&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can't reference any external resources in any of your app files (except for video and audio resources). &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So basically here second point was problem ,we can solve the problem by allowing the unsafe-eval in CSP policy but i was not optimal solution.&lt;/p&gt;

&lt;p&gt;Ever heard about &lt;strong&gt;git bisect&lt;/strong&gt; 🤔,it works on principle  of binary search .In the same way i check all the packages and Bingo found the culprits and finally all sleepless night come to an end.&lt;/p&gt;

&lt;h2&gt;
  
  
  Learnings:-
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;while solving the blog i didnot purpose any hypothesis and write down any causes .so it was same as hitting the bush.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;First i suspect may be webpack config causing this error,try to change its configurations as suggested in github issues and stackoverflow&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  So Debugging method can be summarized as:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KyEzeR4O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ubpk8vwypmcc8r190zet.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KyEzeR4O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ubpk8vwypmcc8r190zet.png" alt="Image description" width="880" height="745"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>webpack</category>
      <category>bug</category>
    </item>
    <item>
      <title>Your Search Engine On Adrenaline</title>
      <dc:creator>Gyana Ranjan panda</dc:creator>
      <pubDate>Mon, 18 Apr 2022 14:21:28 +0000</pubDate>
      <link>https://dev.to/meditatingpanda/your-search-engine-on-adrenaline-3j0p</link>
      <guid>https://dev.to/meditatingpanda/your-search-engine-on-adrenaline-3j0p</guid>
      <description>&lt;p&gt;&lt;strong&gt;From Day of Inception,the fundamentals of search engines are still same.&lt;/strong&gt;&lt;br&gt;
They operate on the same principal by indexing the search results on the users search preferences and their ranking index.&lt;/p&gt;

&lt;h2&gt;
  
  
  Is this a issue?
&lt;/h2&gt;

&lt;p&gt;For a mass number of users ,it is not that of a bigger deal,but what about a niche who uses search engine &lt;strong&gt;Like ,google&lt;/strong&gt; on daily basis for their profession .To put it simply ,suppose a student search for &lt;strong&gt;merge sort&lt;/strong&gt;,instead of giving bunch of more websites to scroll ,it won't be cool to give the snippet itself.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--z_gHW-Se--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h3g2tnay9eb3lwtaktvf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--z_gHW-Se--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h3g2tnay9eb3lwtaktvf.png" alt="Demo Result" width="880" height="562"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is not limited to only this tiny things,basically we can level up our existing search engine to an app store, where we can exploit search pre-existing instant apps,or rather create our own for the daily problem we face.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are instant apps?
&lt;/h2&gt;

&lt;p&gt;Instant apps are the small interactive cards which you get for your search queries.&lt;/p&gt;

&lt;p&gt;We can build instant apps for all kinds of use cases like dictionary, checking football scores, stock prices or notes from your notion or even search history from company slack or anything!&lt;br&gt;
Try them out live - &lt;a href="https://felvin.com/"&gt;felvin&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Everyone thinks of changing the world, but no one thinks of changing himself&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;As the above quote depicts mankind hate changes ,similarly we are so accustomed to our fav search engine that we hardly want to switch ,here &lt;strong&gt;felvin&lt;/strong&gt; provides its browser extension which can be added on top of any of your search engine to provide more utility to your existing search engine.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DZcmK7Qb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mw6yr6t1o6m5eljmgdin.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DZcmK7Qb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mw6yr6t1o6m5eljmgdin.png" alt="Extension" width="880" height="185"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--F93MdBb5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2wf1z4aueq0031js3kbw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--F93MdBb5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2wf1z4aueq0031js3kbw.png" alt="example" width="880" height="683"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;here how it sugarcoats the preexisting search engine. So Opportunities are limitless ,and we are just starting out. feel free to check it out.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
      <category>react</category>
    </item>
  </channel>
</rss>
